|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
This section shows you how to list your running or deleted AWS CloudFormation stacks.
AWS CloudFormation provides two commands,
enable you to get information about your stacks.
cfn-describe-stacks command provides information on your running stacks, and
provides the option of filtering on the stack name. It returns information about the stack, including the
name, stack identifier, and status. For example, suppose you have created three separate stacks on the same
template. After they are created, the
cfn-describe-stacks command will return output
similar to the following:
PROMPT> cfn-describe-stacks STACK my-stack-test-01 CREATE_COMPLETE IPAddress=188.8.131.52;InstanceId=i-13b3207f 2011-02-04T00:39:06Z STACK my-stack-test-02 CREATE_COMPLETE IPAddress=184.108.40.206;InstanceId=i-1fb22173 2011-02-04T00:40:53Z STACK my-stack-test-03 CREATE_COMPLETE IPAddress=220.127.116.11;InstanceId=i-fbb22197 2011-02-04T00:41:05Z
If you know the stack name, you can use
--stack-name to limit the output to one
stack. Otherwise, information on all your running stacks is returned.
cfn-list-stacks command enables you to get a list of any of the stacks you have
created (even those which have been deleted up to 90 days), and provides you the option to filter the
results by stack status. The
cfn-list-stacks command returns summary information about any
of your running or deleted stacks, including the name, stack identifier, template, and status.
The cfn-list-stacks command returns information on deleted stacks for 90 days after they have been deleted.
The cfn-list-stacks command returns output similar to the following:
cfn-list-stacks --stack-status CREATE_COMPLETE STACK STACK_ID NAME CREATION_TIME STATUS STACK arn:aws:cloudformation:us-east-1:123456789012:stack/mut2/83327aa0-863f-11e0-84f1-5081d0136786 mut2 2011-05-24T19:53:36Z CREATE_COMPLETE STACK arn:aws:cloudformation:us-east-1:123456789012:stack/mut1/5d569960-8635-11e0-84f1-5081d0136786 mut1 2011-05-24T18:40:57Z CREATE_COMPLETE