-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-s3): urlForObject() returns invalid URL if bucket is not in same region as stack #14149
Comments
Just adding this for future implementors - since imported buckets can have explicit regions set, we might be able to properly construct the URL even if |
This commit updates urlForObject() to use the bucket's region instead of the stack's region when constructing the returned URL. Refs: aws#14149
This commit updates `urlForObject()` to use the bucket's region instead of the stack's region when constructing the returned URL. Fixes #14149 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
The code for
urlForObject()
here builds the URL by using the region of the stack rather than the bucket. This causes the function to return an incorrect URL if an existing bucket is imported from another region usingfromBucketXXX()
functionWorkarounds
You can currently get around this by copying the bucket objects to a bucket in the same region as the stack that is being deployed
OR use "low level overriding" to change the low level
AWS::CloudFormation::Init
sectionPotential solution
Construct the URL using data from
bucketRegionalDomainName
propThis is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: