AWS CLI list only the name of current running cloudformation stacks?


I’m building up to a larger AWS CLI job but one of the building blocks is stumping me;

How do I get a list of just the names of every currently running AWS Cloudformation stack?

I can list the stacks just fine with the following, but I can’t get a query to pair it down to just the stack name.

I could cut the resulting table down in bash, but I’d love a more elegant aws solution if it exists.


You can add the query parameter to that same query to narrow the result set to only the StackName.

Per @idbehold, you will also need to include all stack status filters except for CREATE_FAILED and DELETE_COMPLETE to truly capture all current stacks. These only need to be delimited by spaces.


Full Example:

Further Reading

Leave a Reply