1
votes

I have a basic question. I've written a cloudformation template to provision an EC2 instance but I would to understand how can I set up a way that the cloudformation template will be triggered when the EC2 instance is terminated. I see the AutoScaling Groups/Launch Configuration you can pass the user data to set up the instance as you want but is there a way to pass the template to create the EC2 exactly as I have defined in the CloudFormation template?

Maybe I am just confused and looking for guidance and best practice.

Thanks!

1

1 Answers

0
votes

Found my own answer after a little bit of research. There is indeed an option in AWS Auto Scaling to choose the CloudFormation Stack.