-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fifo queue without name in nested stack fails to create #5860
Comments
If a queue name is not specified, CloudFormation generates a unique physical ID and uses that ID for the queue name. The generated name will include the containing stack name and the queue resource logical id. To adhere to SQS queue name limitations of max 80 characters CloudFormation will trim the stack name and logical id components in the generated physical ID. When the queue is a fifo queue CloudFormation will append Nested stacks names (generated by CloudFormation) are composed from the parent stack name and the nested stack resource logical ID, resulting in a longer than the average user generated stack name, making fifo queue defined inside a nested stack more likely to hit the max 80 character limit. I'm not quite sure what is the best way for the CDK to make this experience better for users as it seems the only way to make sure this will not happen is to make the queue name required and add verification which is a breaking change. |
How about setting the queueName to |
Just got bit by that too. Worse yet, the log output doesn't actually tell you what the problem was. Just says "resources could not be created". And when you go into AWS, the NestedStack is deleted and is hidden. So for AWS noobs like myself, it's many rabbit holes to go through to find what is wrong. |
The queue name is it's physical ID, when not required, the CDK will not set it, unless provided by the user. Setting a physical name for a resource have implication on the resource update policy, from CloudFormation docs:
Which is why we try to avoid setting a physical name for resources when not required. We will follow up with CloudFormation to see if this can be fixed on their side. |
yep, I get the nested stack id using the AWS cli and use the id in the console URL to view events via the console. Can also view the events with the AWS cli. |
Reproduction Steps
source
MUST USE
cdk deploy
. THE STACK SYNTHESIZES FINE.Error Log
CloudFormation error after running
cdk deploy
:Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: