Support environment variable for S3 addressing_style config #3190
Labels
feature-request
This issue requests a feature.
p2
This is a standard priority issue
response-requested
Waiting on additional info and feedback.
Describe the feature
Allow configuring
boto3
to use the virtual host style (MY-BUCKET.s3.amazonaws.com
) for talking to a bucket by providing theAWS_S3_ADDRESSING_STYLE
environment variable.Use Case
If you want to force
boto3
to include the region in the hostname used forboto3.client("s3", region_name="us-east-1")
, you can set theAWS_S3_US_EAST_1_REGIONAL_ENDPOINT=regional
in the environment variables.If you want to force
boto3
to use the virtual host style (MY-BUCKET.s3.amazonaws.com
) for talking to a bucket, you have to configure it either in application code or in an accessible shared config file. Sometimes, these two options are prohibitively difficult to configure correctly, and configuring this behavior via an environment variable may be significantly easier.Proposed Solution
Add
AWS_S3_ADDRESSING_STYLE
toconfigprovider.py
'sDEFAULT_S3_CONFIG_VARS
'addressing_style
entry.Other Information
No response
Acknowledgements
SDK version used
botocore==1.34.90
Environment details (OS name and version, etc.)
macOS 14.4.1 (23E224)
The text was updated successfully, but these errors were encountered: