aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Add a DeleteStacks" (plural) API for CloudFormation
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
Other
### Resource name
CloudFormation API
### Description
In the AWS CLI we already have `aws cloudformation delete-stack --stack-name ` where we can only delete ONE stack at a time.
Since the AWS back-end should already have a pretty good idea of what resource depends one what other resource , I want to propose the ability to delete CloudFormation stacks in bulk (or batches).
I believe such a feature will be greatly beneficial to many AWS users.
The command (AWS CLI) syntax could then be something like `aws cloudformation delete-stacks --stack-names `
### Other Details
I have played with parallel delete of several CloudFormation stacks at the same time, and sometimes it works, but sometimes things also go wrong. The parallel action is done with my program, but I guess it's not parallel on the AWS side as these commands probably come into some queue.
One side effect is that even though a random CloudFormation stack in this batch may be deleted (success state), not all resources may be deleted because of some API throttling that happened on the back-end which was not transparent/visible to me (not even in CloudTrail). After some back-and-forth with AWS Support I came to find out that when you delete CloudFomration templates in parallel (effectively calling many instances of `aws cloudformation delete-stack --stack-name ` commands), strange things can sometimes happen, as described.
Some stacks do fail, for example, when you try to delete EKS NodeGroups at the same time as the Cluster stack, the cluster stack will end in a fail state because it has some dependencies in the NodeGroup stack(s).
I am just wondering why the AWS back-end cannot detect the dependency before any action is taken and then run the delete in the right sequence where needed and where API throttling does occur, just handle it like they tell the customers to handle it..
Obviously this will not be possible when submitting individual `delete-stack` calls, but a bulk command (like `delete-stacks`) might enable such dependency detection and proper processing of all the deletion of stacks in the right order.
Contributor guide
Research direction
Start with the CloudFormation API and the existing AWS CLI `delete-stack --stack-name` operation described in the issue. Define how a plural `delete-stacks --stack-names` request would process dependencies, ordering, failures, and throttling; done means the bulk operation can safely delete the requested stacks and report unsuccessful resource deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100