| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Get the template used to create a running or deleted stack.
This command will return the text of the template used to create a stack.
Note
The cfn-get-template command returns template information from a deleted stack for 90 days after the stack has been deleted.
cfn-get-template
StackName
common-options
| Name | Description | Required |
|---|---|---|
|
|
The name of the stack whose template you want to get. You can also set this value using
Type: String Default: None |
No |
The command returns the template body, enclosed in double quotes.
AWS CloudFormation displays errors on stderr.
This example gets the template used with the example-template stack.
PROMPT>cfn-get-template example-template" { "AWSTemplateFormatVersion" : "2010-04-01", "Resources" : { "myEC2SGrpOne" : { "Type" : "AWS::SecurityGroup","Version" : "2009-11-30","Properties" : { "GroupDescription" : "foo" } } } } "