An application on EC2 frequently needs in-process restarts. Logs with restart errors are sent to a CloudWatch Logs group and an alarm notifies an engineer via SNS. The engineer manually restarts the app on instances. How can you automate restarting the application (without rebooting instances) in the most operationally efficient way?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure an AWS Systems Manager Automation runbook that runs a script to restart the application on the instances. Configure an Amazon EventBridge rule that reacts when the CloudWatch alarm enters ALARM state. Specify the runbook as a target of the rule..
Why this is the answer
The most operationally efficient solution uses Amazon EventBridge to directly trigger an AWS Systems Manager Automation runbook. When the CloudWatch alarm enters the ALARM state, EventBridge can detect this state change and invoke the specified runbook. The runbook then executes a script to restart the application on the affected EC2 instances without requiring instance reboots. This approach is efficient because it directly connects the alarm state to the automation, minimizing intermediate components. Using SNS to invoke the runbook directly or via Lambda adds unnecessary complexity. While Lambda can invoke a runbook, EventBridge provides a native, direct integration for CloudWatch alarm state changes. Creating a Lambda function as an event destination for SNS and then having Lambda invoke the runbook introduces an extra layer that is not needed for this specific workflow.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed