What should the SysOps administrator do to meet these requirements?
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.
Set the Auto Scaling group’s termination policy to OldestInstance.
Set the Auto Scaling group’s termination policy to OldestLaunchConfiguration.
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.
Explanations:
Enabling instance scale-in protection ensures that the instance is not terminated during message processing, which can take up to 12 hours. The SysOps administrator can enable and disable this protection programmatically as needed.
The termination policy “OldestInstance” would terminate the instance that has been running the longest, which might interrupt message processing on that instance. This is not suitable for preventing interruption during message processing.
The termination policy “OldestLaunchConfiguration” is used when the launch configuration changes, not for preventing instance termination during message processing. It doesn’t address the issue of protecting an instance while processing messages.
Suspending the Launch and Terminate scaling processes can prevent scaling activities, but it does not specifically address preventing the termination of a single instance during processing. This method would be more disruptive than needed.