-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[ssm] BucketName: "dummy-value-for-" results in unpredictable behavior #9138
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-ssmRelated to AWS Systems ManagerRelated to AWS Systems ManagerbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1
Description
SystemsManager 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ssmRelated to AWS Systems ManagerRelated to AWS Systems ManagerbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1