-
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-deployment: Wrong URL in BucketDeployment.deployedBucket.bucketWebsiteUrl #23354
Comments
When we return the aws-cdk/packages/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts Lines 463 to 467 in 1485f48
I can't see anywhere else where we are setting
aws-cdk/packages/@aws-cdk/aws-s3/lib/bucket.ts Lines 1612 to 1624 in 1485f48
We should be able to calculate this ourselves based on the region using the docs you linked. And if not, we should offer a way to override this setting. Thanks for reporting! |
@peterwoodworth I don't think we can calculate this just from the ARN. Unfortunately Bucket ARNs do not contain a region. Wo do you think? |
#23919 will fix this for scenarios where the destination bucket is in the same region as the stack. |
…etWebsiteUrl Fixes aws#23354
…etWebsiteUrl Fixes aws#23354
…etWebsiteUrl Fixes aws#23354
…etWebsiteUrl Fixes aws#23354
…etWebsiteUrl Fixes aws#23354
…etWebsiteUrl (#24055) Fixes #23354 Without pass-through of all attribute values, it is currently not possible to automatically force a dependency on the deployment for every attribute. This change merely sets the bucket's region & account, so that all computed website/domain attributes will now include the correct values. Other attributes, and manually set website/domain attributes are not supported. Additionally the documentation has been extended to highlight the above issue and provide a workaround. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
I deploy a static website using s3 deployment, and print the endpoint from BucketDeployment.deployedBucket.bucketWebsiteUrl. When deploying to Frankfurt region the URL I get http://my-sweet-stack-123456789-xxxxxxxxxx.s3-website-eu-central-1.amazonaws.com/
That is, the URL I received has a hyphen before the region name, but the actual endpoint is actually with a dot (...s3-website.eu-central-1...)
Expected Behavior
The actual URL is http://my-sweet-stack-123456789-xxxxxxxxxx.s3-website.eu-central-1.amazonaws.com/
As is indeed documented here: Amazon S3 website endpoints
Current Behavior
The URL in BucketDeployment.deployedBucket.bucketWebsiteUrl is wrong and leads nowhere.
Reproduction Steps
Possible Solution
If had to guess I'd say that either there's a typo in the table that maps regions to static hosting endpoint URL format, or there is no such table.
Additional Information/Context
No response
CDK CLI Version
2.54.0 (build 9f41881)
Framework Version
No response
Node.js Version
v12.22.9
OS
Ubuntu 22.04.1
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: