[ssm] BucketName: "dummy-value-for-" results in unpredictable behavior
See original GitHub issueSystemsManager parameter lookup returns “dummy-value-for-XXXX” at first run. But if used as a part of BucketName, this throws an exception on invalid bucket name
This results in unpredictable behavior
- synth/deploy may work for several code changes in a row,
- and fail miserably after cdk context --clear
Reproduction Steps
var bucketName = StringParameter.ValueFromLookup(stack, "/ssm/param/bucketName");
var bucketProps = new BucketProps { BucketName = bucketName, }
Error Log
Unhandled exception. Amazon.JSII.Runtime.JsiiException: Invalid S3 bucket name (value: logs.dummy-value-for-/ssm/param/bucketName)
Bucket name must be at least 3 and no more than 63 characters
Bucket name must only contain lowercase characters and the symbols, period (.) and dash (-) (offset: 21)
Environment
-
cdk --version 1.51.0 (build 8c2d53c)
- Node.js Version: v12.7.0
- OS: Windows
- Language (Version): C#
Other
Can you please check for dummy and not throw from resource constructors? You do check for tokens already, don’t you?
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:5 (1 by maintainers)
Top Results From Across the Web
ARM assemble Program Error- "This Register Combination ...
A1477E This register combination results in UNPREDICTABLE behavior This error is generated when you are assembling an instruction that has ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A potential workaround might be to use
StringParameter.valueForStringParameter()
instead ofStringParameter.valueFromLookup()
. That method returns a token instead of a string, and I found that it worked for me in the case ofAlmost the same problem occurs when specifying a custom domain in API Gateway.