Upgrade boto3(1.28.*) to allow Service-specific endpoints #2811
Labels
api
Issue related to the REST API
good first issue
Good for newcomers
improvement
Improvement to the existing platform
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 theendpoint_url
in thes3_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)
The text was updated successfully, but these errors were encountered: