An error occurred (ValidationError) when calling the DescribeStacks operation: 1 validation error detected: Value ‘2sl_batch’ at ‘stackName’ failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0–9]*|arn:[-a-zA-Z0–9:/._+]*
Error with name of CloudFormation stack
Published in
2 min readJul 28, 2022
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Bugs | AWS Security | Secure Code
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While trying to run an aws cloudformation deploy command I got this error:
An error occurred (ValidationError) when calling the DescribeStacks operation: 1 validation error detected: Value ‘2sl_batch’ at ‘stackName’ failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0–9]*|arn:[-a-zA-Z0–9:/._+]*
CloudFormation doesn’t allow the underscore _ character in stack names or names that starts with numbers.
Instead of this:
aws cloudformation --stack-name 2sl_batch ....