(s3): Bucket.fromBucketName crashes on valid S3 bucket name #17758
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
needs-reproduction
This issue needs reproduction.
needs-triage
This issue or PR still needs to be triaged.
p1
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
What is the problem?
We have a stack that uses
Bucket.fromBucketName
with the name of an athena results bucket. These are typically named like so "aws-athena-query-results--" and are automatically created by AWS, which is why we use thefromBucketName
function. After upgrading cdk to version1.134.0
synth started failing complainining about that bucket name:I tried a few versions and
1.130.0
is the last that works, everything after rejects the name.Could it be b/c the name ends in a number?
Reproduction Steps
Bucket.fromBucketName(this, "myBucket", "aws-athena-query-results-123456789-us-east-2")
What did you expect to happen?
It uses the bucket.
What actually happened?
CDK CLI Version
1.134.0 (build dd5e12d)
Framework Version
1.134
Node.js Version
v14.17.6
OS
Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64
Language
Java
Language Version
Java 11
Other information
No response
The text was updated successfully, but these errors were encountered: