Skip to content

Instantly share code, notes, and snippets.

@ctgardner
Last active March 22, 2019 03:27
Show Gist options
  • Save ctgardner/d6c3832765e4a5501c54d41f08c7f0ec to your computer and use it in GitHub Desktop.
Save ctgardner/d6c3832765e4a5501c54d41f08c7f0ec to your computer and use it in GitHub Desktop.
Filter CloudFormation stacks by status
# List delete stacks:
aws cloudformation list-stacks --stack-status-filter DELETE_COMPLETE
# Or:
aws cloudformation list-stacks --query "StackSummaries[?StackStatus == 'DELETE_COMPLETE']"
# List all stacks, excluding deleted stacks
aws cloudformation list-stacks --query "StackSummaries[?StackStatus != 'DELETE_COMPLETE']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment