The S3 resources in the AWS Provider are currently implemented using the AWS SDK for Go v1. The team will be updating the SDK for S3 (and other service) to the AWS SDK for Go v2. In v1, the S3 client uses a global endpoint (s3.amazonaws.com) in us-east-1 and regional endpoints (s3.<region>.amazonaws.com) for all others.
However, in v2, the S3 client uses regional endpoints for all regions. In practice, this change is unlikely to impact users, but some AWS account setups may restrict how endpoints are used, so it is potentially a breaking change.
v1 supports using regional endpoints for all regions using the environment variable AWS_S3_US_EAST_1_REGIONAL_ENDPOINT, the shared config parameter s3_us_east_1_regional_endpoint, or the Go config parameter S3UsEast1RegionalEndpoint. The valid values are legacy (i.e. global endpoint for us-east-1) or regional.
v2 supports uses regional endpoints for all regions, as well as supporting a pseudo-region aws-global which uses the global endpoint.
Proposal
Add support for the S3 us-east-1 regional endpoint configuration settings to the AWS Provider. This will preserve the current behaviour unless it is set to regional, which will then use regional endpoints in all regions
When the S3 client is updated to use the AWS SDK for Go v2, preserve the v1 behaviour of defaulting to the global endpoint in us-east-1 and continue supporting the configuration parameters
When the AWS Provider v6 is released, deprecate support for the global S3 endpoint
When the AWS Provider v7 is released, drop support for the global S3 endpoint
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
The S3 resources in the AWS Provider are currently implemented using the AWS SDK for Go v1. The team will be updating the SDK for S3 (and other service) to the AWS SDK for Go v2. In v1, the S3 client uses a global endpoint (
s3.amazonaws.com
) inus-east-1
and regional endpoints (s3.<region>.amazonaws.com
) for all others.However, in v2, the S3 client uses regional endpoints for all regions. In practice, this change is unlikely to impact users, but some AWS account setups may restrict how endpoints are used, so it is potentially a breaking change.
v1 supports using regional endpoints for all regions using the environment variable
AWS_S3_US_EAST_1_REGIONAL_ENDPOINT
, the shared config parameters3_us_east_1_regional_endpoint
, or the Go config parameterS3UsEast1RegionalEndpoint
. The valid values arelegacy
(i.e. global endpoint forus-east-1
) orregional
.v2 supports uses regional endpoints for all regions, as well as supporting a pseudo-region
aws-global
which uses the global endpoint.Proposal
regional
, which will then use regional endpoints in all regionsus-east-1
and continue supporting the configuration parametersAffected Resource(s) and/or Data Source(s)
All S3 resources
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
None