Bird
0
0

What is the best approach?

hard📝 Application Q9 of 15
AWS - CloudFormation
You detected drift on a stack where a resource property was changed manually. You want to update the stack template to match the current resource state without replacing the resource. What is the best approach?
AIgnore the drift and continue using the stack as is
BUse the 'Import resources into stack' feature with the updated template
CDelete the resource and recreate it with the updated template
DManually edit the stack template to match the resource and update the stack
Step-by-Step Solution
Solution:
  1. Step 1: Understand how to sync template with manual changes

    Editing the template to match current resource properties and updating stack avoids replacement.
  2. Step 2: Evaluate other options

    Import is for new resources, deleting recreates resource, ignoring drift is not best practice.
  3. Final Answer:

    Manually edit the stack template to match the resource and update the stack -> Option D
  4. Quick Check:

    Sync template to resource = Edit template + update stack [OK]
Quick Trick: Edit template to match resource, then update stack to fix drift [OK]
Common Mistakes:
  • Using import for existing resources
  • Deleting resources unnecessarily
  • Ignoring drift

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes