Listing resources - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Listing resources

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

The following example shows the resources for the myteststack stack:

$ aws cloudformation list-stack-resources --stack-name myteststack { "StackResourceSummaries": [ { "ResourceStatus": "CREATE_COMPLETE", "ResourceType": "AWS::S3::Bucket", "ResourceStatusReason": null, "LastUpdatedTimestamp": "2013-08-23T01:02:28.025Z", "PhysicalResourceId": "myteststack-s3bucket-sample", "LogicalResourceId": "S3Bucket" } ] }

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

Note

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