AWS Certified DevOps Engineer – Professional — Question 177

A company uses AWS CloudFormation to manage an application that runs on Amazon EC2 Instances. The instances are in an Amazon EC2 Auto Scaling group. The company wants to treat its infrastructure as immutable.

A DevOps engineer must implement a solution to replace two EC2 instances at a time whenever operating system configuration updates are needed or when new Amazon Machine. Images (AMIs) are needed. A minimum of four EC2 instances must be running whenever an update is in progress.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct because it utilizes the AutoScalingRollingUpdate policy, allowing for controlled updates while ensuring that a minimum of four instances remain running. Option B and C do not achieve the immutability requirement as they rely on in-place updates rather than replacing instances. Option D, while similar to A, uses an AutoScalingReplacingUpdate policy which is not suitable for the scenario as it doesn't provide the same level of control during the update process.