Happy to Announce Our New Discussion Forum | Join Now

WhizQuiz Oct 17

You have a current Clouformation template defines in AWS. You need to change the current alarm threshold defined in the Cloudwatch alarm. How can you achieve this?

  • Currently there is no option to change what is already defined in Clouformation templates
  • Update the template and then update the stack with the new template. Automatically all resources will be changed in the stack
  • Update the template and then update the stack with the new template. Only those resources that need to be changed will be changed. All other resources which do not need to be changed will remain as they are
  • Delete the current clouformation template. Create a new one which will update the current resources

0 voters

Correct Answer – C

Option A is incorrect because Clouformation templates have the option to update resources.

Option B is incorrect because only those resources that need to be changed as part of the stack update are actually updated.

Option D is incorrect because deleting the stack is not the ideal option when you already have a change option available.

When you need to make changes to a stack’s settings or change its resources, you update the stack instead of deleting it and creating a new stack. For example, if you have a stack with an EC2 instance, you can update the stack to change the instance’s AMI ID.

When you update a stack, you submit changes, such as new input parameter values or an updated template. AWS CloudFormation compares the changes you submit with the current state of your stack and updates only the changed resources

For more information on stack updates please refer to the below link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html

So, the correct answer is: Update the template and then update the stack with the new template. Only those resources that need to be changed will be changed. All other resources which do not need to be changed will remain as they are.

Hi there:)
Great Explanation. It’s really helpful. Keep it up Whizlabs Team…!

Cheers…!

2 Likes

Thank you CloudMania!

Hi All,
We can modify the cloudformation template and get the updates effected.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-get-template.html

Thanks
Viswanath

1 Like