List CloudFormation Stacks

An AWS CLI command to list all CloudFormation Stacks and a query to show how to only show StackId and StackName

An AWS CLI command that retrieves all the stacks from CloudFormation and outputs them. The optional query parameter limits the output of the command so that only the StackIs and the StackName are returned.

aws cloudformation list-stacks
or
aws cloudformation list-stacks  --query "StackSummaries[*].{StackId: StackId, StackName: StackName}"
                                


Created by:

Paul Johnston

Paul Johnston

CTO, Consultant, Interim and Strategist (and ex-Serverless Developer Advocate at AWS)

Follow on LinkedIn