Advertisement
Javi

AWS: CLI for deleting all stacks in da region

Oct 3rd, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. stacks=$(aws cloudformation list-stacks --query StackSummaries[].[StackName] --output text)
  4. while read -r line ; do aws cloudformation delete-stack --stack-name "$line"; done <<< "$stacks"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement