Locate template that was used to create cloudformation stack

Viewed 66

Is there a way to locate the template that was used to create/update the stack? All the templates are stored as objects in S3 bucket and created/updated from there. At the moment I can only do that by stack and template name but this is not accurate. I was just wondering does AWS stores this information anywhere.

1 Answers

This information is stored in CloudTrail, so if you (1) created the stack within the last 90 days, or (2) have CloudTrail configured to store events, you should be able to find it.

Look for the event name CreateStack.

Inside the event, requestParameters.stackName can be used to filter the events, and and requestParameters.templateURL will tell you where the template was stored.

Note that templates which are uploaded from the user's machine are also stored in S3, using a CloudFormation-managed bucket in the AWS account.

Related