-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Fix S3 Control operations for S3 Express Directory Buckets #44471
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
base: main
Are you sure you want to change the base?
Fix S3 Control operations for S3 Express Directory Buckets #44471
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
8f31bc4
to
0ad814f
Compare
I might as well add support for all the other s3 control operations |
Friendly bump |
Description
Fixes S3 Express Directory Bucket operations that were failing with 403 Forbidden errors due to incorrect API endpoint routing across all S3 Control resources.
Problem: When performing operations on S3 Directory Bucket resources (access points, policies, lifecycle configurations), the provider was incorrectly routing requests to the standard S3 Control API endpoint (
s3-control.amazonaws.com
) instead of the required endpoints for Directory Buckets. This particularly affected tagging operations which require the S3 Express Control API endpoint (s3express-control.region.amazonaws.com
).Error encountered:
Despite having the correct IAM permissions (
s3express:ListTagsForResource
), and also (s3:ListTagsForResource
) operations failed because requests were sent to the wrong API endpoint.Solution:
S3ExpressControlClient()
method to AWSClient that uses the corrects3express-control.region.amazonaws.com
endpoint for Directory Bucket tagging operations:s3express:
)References
Testing
Usually I would test in my personal AWS account, but directory buckets are awkward resources. Happy to test in work environment if additional testing output is required.