Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade boto3(1.28.*) to allow Service-specific endpoints #2811

Closed
hamishhossack opened this issue Sep 28, 2023 · 2 comments
Closed

Upgrade boto3(1.28.*) to allow Service-specific endpoints #2811

hamishhossack opened this issue Sep 28, 2023 · 2 comments
Assignees
Labels
api Issue related to the REST API good first issue Good for newcomers improvement Improvement to the existing platform

Comments

@hamishhossack
Copy link
Contributor

hamishhossack commented Sep 28, 2023

Is your feature request related to a problem? Please describe.

Using the importorganisationfroms3 feature to replicate an instance across different environments. This will use an aws bucket to import the config json as defined by the documentation. In this instance, we're using localstack to configure a mocked aws client in local and test environments.

Essentially the change would be bump boto3 to 1.28.0 or later, however, this could impact other features using boto3, eg. dynamodb within the edge proxy. If so, please see the alternative methods.

Describe the solution you'd like

The ability to define which aws client we can use would be greatly appreciated, this would want to be with minimal config change and just using environment variables.

Using these Service-Specific endpoints would be great for the s3 importer.

Setting AWS_ENDPOINT_URL on the docker image and boto3 should pick up the localstack instance via the endpoint when this variable is set.

Describe alternatives you've considered

An alternative and simplier approach could be just to define a AWS_S3_ENDPOINT_URL in the flagsmith config, much like the SES variable found here and using this within the importer to set the endpoint_url in the s3_client here.

An alternative could be, allowing custom boto3 configurations, either created in the docker image or just extending flagsmith as a base image.

Additional context

version 1.28.0 CHANGELOG where this feature is introduced: https://github.com/boto/boto3/blob/develop/CHANGELOG.rst#L601
conversation on this feature for boto3: boto/boto3#2099 (comment)

@dabeeeenster dabeeeenster added improvement Improvement to the existing platform api Issue related to the REST API good first issue Good for newcomers labels Sep 29, 2023
@dabeeeenster
Copy link
Contributor

Nice idea - happy to receive a PR for this if you have time!

@matthewelwell
Copy link
Contributor

Resolved in #2926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API good first issue Good for newcomers improvement Improvement to the existing platform
Projects
None yet
Development

No branches or pull requests

3 participants