Created
May 22, 2019 03:55
-
-
Save tfentonz/0e9c25709c3069206ebf59d5d46ebc24 to your computer and use it in GitHub Desktop.
AWS CLI CloudFormation list stacks with filter and sort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws cloudformation list-stacks --query 'StackSummaries[?starts_with(StackName, `production`)].{StackName:StackName,StackStatus:StackStatus} | sort_by(@, &StackName)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Find CloudFormations stacks beginning with "production" and sort by StackName.
Uses JMESPath built-in functions starts_with and sort_by.