AWS Certified SysOps Administrator – Associate (legacy) — Question 375

A user is running a batch process on EBS backed EC2 instances. The batch process starts a few instances to process hadoop Map reduce jobs which can run between 50 `" 600 minutes or sometimes for more time. The user wants to configure that the instance gets terminated only when the process is completed. How can the user configure this with CloudWatch?

Answer options

Correct answer: A

Explanation

By configuring a CloudWatch alarm based on CPU utilization, users can leverage EC2 action triggers to automatically terminate an instance when its workload drops (e.g., below 5% CPU), signaling that the MapReduce job has finished. Using a fixed timer like 600 minutes could prematurely terminate jobs that run longer, while Auto Scaling would terminate all instances rather than individual ones as they finish. CloudWatch natively supports EC2 termination actions, making automated termination both possible and efficient.