[CLI] cdk deploy breaks when bootstrapping with --qualifier that is too large #9255
Labels
@aws-cdk/pipelines
CDK Pipelines library
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
p2
package/tools
Related to AWS CDK Tools or CLI
Using a long qualifier name causes IAM error because the IAM Role name limit is 64 characters.
Use Case
I created a rather long name for my stack. And I used the --qualifier option as well and it was long to. This is because I like descriptive names in the various consoles that have resources created after the CDK is deployed. Besides the default qualifier of
hnb659fds
is kind of useless.Proposed Solution
I would suggest that the --qualifier be limited to 9 characters and that it be checked before the bootstrap is executed and an error reported to the user.
For example a naive fix could be applied here by using Cloudformation's AllowedPatterns and ConstraintDescription
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: