1. A developer is working with AWS CloudFormation and needs to update a stack. Before applying the update, they create a change set to preview the changes. The change set shows that an RDS DB instance will be replaced (Action: Replace, Replacement: True). The developer is concerned about data loss. What does 'Replacement: True' indicate in a CloudFormation change set, and what should the developer do to prevent data loss?
- A. It means CloudFormation will modify the DB instance in place; no data loss will occur. The developer should proceed.
- B. It means CloudFormation will delete the existing DB instance and create a new one. The developer should take a manual snapshot before applying the change set.✓ Correct
- C. It means CloudFormation detected a drift and will reconcile the resource. Data is preserved during reconciliation.
- D. It means CloudFormation will create a new DB instance first and then delete the old one, similar to a blue/green deployment, preserving data.
- E. It means the RDS DB instance has a pending modification that requires a maintenance window. The developer should schedule the change set execution during a maintenance window.
Explanation
In a CloudFormation change set, 'Replacement: True' means that the resource will be deleted and a new resource will be created in its place. For a stateful resource like an RDS DB instance, this means the existing database instance will be deleted (along with all its data unless a final snapshot is taken or deletion protection is enabled). The developer must take a manual DB snapshot before executing the change set to preserve data. They should also consider setting `DeletionPolicy: Snapshot` on the DB instance resource in the template to ensure CloudFormation takes a snapshot before deletion. — Option A is incorrect because 'Replacement: True' explicitly means the resource will be replaced (deleted and recreated), not modified in place. Option C is incorrect because replacement is triggered by a template change that requires a new physical resource, not by drift detection; drift reconciliation is a separate concept. Option D is incorrect because CloudFormation does not perform a zero-downtime blue/green-style replacement for RDS instances; the old instance is deleted, resulting in data loss if not backed up. Option E is incorrect because 'Replacement: True' in a change set indicates resource replacement, not a pending modification requiring a maintenance window.