Failed Change Set Destroyer deletes failed change sets from CloudFormation stacks.
Available on the AWS Serverless Application Repository - failed-change-sets-destroyer
Deploying an unchanged stack creates failed change set which may lead to failure with the following error message:
An error occurred (LimitExceededException) when calling the CreateChangeSet operation: ChangeSet limit exceeded for stack ...
It means the maximum number of change sets for a stack was reached.
This lambda is removing all failed change sets so the error should not occur.
- Python 3.12+
- AWS SAM CLI
To deploy Failed Change Set Destroyer edit deploy.bat file and change
- <stack-name> - new stack name
- <s3-bucket-name> - s3 bucket name for code and template file needed for deployment of the AWS Lambda
- <s3-bucket-prefix> - logical folder for the code and template file
Then run the Lambda.
{
"dry_run": true,
"regions": ["us-west-1", "..."]
}
- dry_run: true
- regions: all regions
Failed Change Set Destroyer by default is scheduled every first day of the month.
The schedule can be changed by overriding SchedulerCronParameter
.
The scheduler can be disabled using SchedulerEnabledParameter
.