SAP-C02 Question 159
Select 2Your organization is using AWS CloudFormation to deploy a multi-region application stack. The stack includes an Amazon RDS database, an Amazon S3 bucket, and an Amazon EC2 Auto Scaling group. The organization requires that changes to the stack are reviewed and approved before being applied. Additionally, they want to ensure that resource updates to the Amazon RDS database do not cause downtime. Which approach should you take to meet these requirements?
- A
Use CloudFormation Change Sets to preview changes and require approval before applying them.
- B
Enable CloudFormation Stack Policies to restrict updates to the Amazon RDS database.
- C
Use the AWS CloudFormation Drift Detection feature to validate the stack changes prior to update operations.
- D
Set the 'UpdateReplacePolicy' attribute on the Amazon RDS resource to 'Retain' to prevent downtime during updates.
- E
Utilize the 'UpdatePolicy' attribute for the Amazon EC2 Auto Scaling group to manage rolling updates.
Show answer and explanation
Correct answers: A, E
Explanation
To meet the requirements of reviewing and approving changes before applying them, CloudFormation Change Sets should be used. Additionally, to ensure no downtime during updates related to the EC2 Auto Scaling group, the 'UpdatePolicy' attribute should be utilized. Stack policies and Drift Detection do not directly address the stated requirements, and the 'UpdateReplacePolicy' attribute is not a correct mechanism for preventing downtime during RDS updates.
- A. Correct.
CloudFormation Change Sets allow you to preview changes to your stack before applying them. This ensures the stack updates are reviewed and approved as required.
- B. Incorrect.
Stack Policies are used to restrict updates to specific resources but do not inherently prevent downtime or review changes. They are not applicable in this scenario.
- C. Incorrect.
Drift Detection identifies whether a stack's resources have drifted from their defined configurations, but it does not validate or preview changes before updates.
- D. Incorrect.
The 'UpdateReplacePolicy' attribute defines what happens to a resource when it's replaced, such as retaining or deleting it. However, it does not prevent downtime during updates for Amazon RDS.
- E. Correct.
The 'UpdatePolicy' attribute is specifically used to configure rolling updates for Auto Scaling groups, ensuring smooth updates without downtime.