Exams / SOA-C03 / EC2 Auto Scaling / Question 1
SOA-C03 practice question: EC2 Auto Scaling (1 of 3)
Reliability and Business Continuity A free question from our original SOA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A ski resort's booking site runs in an EC2 Auto Scaling group. Each instance writes application logs to its local disk, and the compliance team needs every log file, including those on instances removed during scale-in. Today, logs from terminated instances are lost. An upload script already exists and takes about two minutes to copy the logs to Amazon S3. How should a CloudOps engineer make sure the script finishes before an instance is terminated?
Choose one answer.
- AA. Turn on instance scale-in protection for the group so that Auto Scaling does not terminate instances that still hold log files.
- BB. Add a lifecycle hook for instance termination, run the upload script when the hook fires, and then complete the lifecycle action.
- CC. Raise the group's default cooldown to five minutes so that each instance has time to run the upload script before it is terminated.
- DD. Add the upload script to the instances' user data so that it runs whenever the operating system begins to shut down.
Show the answer and explanation
Answer: B
Explanation
Lifecycle hooks are the Auto Scaling feature for running custom actions when an instance launches or terminates. A termination hook holds the instance in a wait state until the action completes or the heartbeat timeout passes. Scale-in protection, cooldowns and user data do not provide a controlled pause before termination.
Study
Keep practicing
Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.