Recuperación de una plantilla - AWS CloudFormation

Recuperación de una plantilla

AWS CloudFormation almacena la plantilla que utiliza para crear la pila como parte de la pila. Para recuperar la plantilla de CloudFormation utilice el comando aws cloudformation get-template.

nota

El comando aws cloudformation get-template devuelve las plantillas de pilas eliminadas durante un máximo de 90 días una vez que se ha eliminado la plantilla.

En el siguiente ejemplo, se muestra la plantilla para la pila myteststack.

$ aws cloudformation get-template --stack-name myteststack { "TemplateBody": { "AWSTemplateFormatVersion": "2010-09-09", "Outputs": { "BucketName": { "Description": "Name of S3 bucket to hold website content", "Value": { "Ref": "S3Bucket" } } }, "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.", "Resources": { "S3Bucket": { "Type": "AWS::S3::Bucket", "Properties": { "AccessControl": "PublicRead" } } } } }

La salida contiene el cuerpo completo de la plantilla, entre comillas.