AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Listing Member Resources

This section shows you how to list the resources in a AWS CloudFormation stack.

Immediately after you run the cfn-create-stack command, you can list its resources using cfn-list-stack-resources. This command lists a summary of each resource in the stack you specify with the --stack-name parameter. The report includes a summary of the stack, including the creation or deletion status.

For example, suppose you have sample stack with the name MyEventStack02. You list the resources for the stack as follows:

PROMPT> cfn-list-stack-resources --stack-name MyEventStack02

STACK_RESOURCE  MyInstance    i-67a6050b
AWS::EC2::Instance      2011-01-11T06:24:21Z  CREATE_COMPLETE

STACK_RESOURCE  MyAlarmTopic
arn:aws:sns:us-east-1:165024647323:MyEventStack02-MyAlarmTopic-8RFXAXGNW520/MyEventStack02
AWS::SNS::Topic         2011-01-11T06:24:37Z  CREATE_COMPLETE

STACK_RESOURCE  CPUAlarm      MyEventStack02-CPUAlarm-PKOIPR1BE050
AWS::CloudWatch::Alarm  2011-07-11T06:24:56Z  CREATE_COMPLETE

AWS CloudFormation will report resource details on any running or deleted stack. If you specify the name of a stack whose status is CREATE_IN_PROCESS, AWS CloudFormation will report only those resources whose status is CREATE_COMPLETE.

Note

The cfn-describe-stack-resources command returns information on deleted stacks for 90 days after they have been deleted.