Templates

Now we want to look at the actual templates that were used to create the CloudFormation stacks that we see. We can do this with the CloudFormation GetTemplate command. This command works like the DescribeStacks command, where we can pass in a template name to the --stack-name parameter to retrieve the template for that specific stack. It also works the same in the way that, if you are looking to retrieve the template of a deleted stack, you need to specify the unique stack ID instead of the name. To get the template of our demo stack, we can run the following AWS CLI command:

aws cloudformation get-template --stack-name Test-Lamp-Stack --region us-west-2

The response should include the JSON/YAML template that was used to create ...

Get Hands-On AWS Penetration Testing with Kali Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.