AWS Certified SysOps Administrator – Associate — Question 187
A company is running Amazon EC2 On-Demand Instances in an Auto Scaling group. The instances process messages from an Amazon Simple Queue Service (Amazon SQS) queue. The Auto Scaling group is set to scale based on the number of messages in the queue. Messages can take up to 12 hours to process completely. A SysOps administrator must ensure that instances are not interrupted during message processing.
What should the SysOps administrator do to meet these requirements?
Answer options
- A. Enable instance scale-in protection for the specific instance in the Auto Scaling group at the start of message processing by calling the Amazon EC2 Auto Scaling API from the processing script. Disable instance scale-in protection after message processing is complete by calling the Amazon EC2 Auto Scaling API from the processing script.
- B. Set the Auto Scaling group's termination policy to OldestInstance.
- C. Set the Auto Scaling group's termination policy to OldestLaunchConfiguration.
- D. Suspend the Launch and Terminate scaling processes for the specific instance in the Auto Scaling group at the start of message processing by calling the Amazon EC2 Auto Scaling API from the processing script. Resume the scaling processes after message processing is complete by calling the Amazon EC2 Auto Scaling API from the processing script.
Correct answer: A
Explanation
The correct answer is A because enabling scale-in protection ensures that the instance remains unaffected by scaling down while it processes messages. The other options either change the termination policy, which does not guarantee that the specific instance remains active during processing, or suspend scaling processes entirely, which may not be necessary and could lead to inefficient resource utilization.