Skip to content

This is not possible to delete stacks with name longer than 128 chars #6840

@ikhvostenkov

Description

@ikhvostenkov

Describe the bug

This is possible to create stack with name longer than 128 chars through CDK, but this is not possible to delete stack with AWS cli with stack name longer than 128 chars. Probably this should be prohibited to create stacks with name longer than 128 char in CDK, but as soon as this is possible you should have chance to delete it, especially if you have ~100 such stacks, doing this through AWS Console manually is annoying.

Expected Behavior

Stack is successfully deleted.

Current Behavior

An error occurred (ValidationError) when calling the DeleteStack operation: Stack name cannot exceed 128 characters

Reproduction Steps

Steps to Reproduce:

  1. Create any CFN stack with name longer than 128 characters, not from AWS console, but using cdk construct. This is possible to do it with cdk constructs.
  2. Try to delete stack with aws cli:
    aws cloudformation delete-stack --stack-name {name}

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws --version aws-cli/1.20.6 Python/3.8.6 Darwin/21.3.0 botocore/1.21.7

Environment details (OS name and version, etc.)

sw_vers ProductName: macOS ProductVersion: 12.2.1 BuildVersion: 21D62

Metadata

Metadata

Assignees

Labels

guidanceQuestion that needs advice or information.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions