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

[s3] Add ability to set endpoint_url from AWS_ENDPOINT_URL env variable #773

Closed
wants to merge 1 commit into from

Conversation

rockmind
Copy link

@rockmind rockmind commented Jun 6, 2023

Title

[s3] Add ability to set endpoint_url from AWS_ENDPOINT_URL env variable

Motivation

The reason for this modification is that the addition of this functionality to the "smart-open" library addresses a longstanding PR in the "boto3" library. For years, there has been a lack of progress in implementing this feature directly in "boto3". However, "boto3" allows for the configuration of certain parameters, such as the aws_secret_access_key or aws_access_key_id, through environment variables. By extending the "smart-open" library to support the "AWS_ENDPOINT_URL" environment variable, users can leverage a more flexible approach to configuring the custom endpoint URL for S3 connections. This modification provides a workaround for the limitation in "boto3" and enables users to easily configure the S3 endpoint URL without relying solely on changes to the "boto3" library itself.

The addition of this functionality to the "smart-open" library is valuable as it allows for easy configuration of different S3 connections without the need to modify code paths, providing convenience and flexibility when working with multiple environments

Tests

Added test_smart_open::SmartOpenTest::test_s3_endpoint_from_env_var

@rockmind
Copy link
Author

Closing, already out of date:
boto/boto3#2099 (comment)

@rockmind rockmind closed this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant