AmazonAmazon SysOps Administrator Associate SOA-C02 Certification·EN·Updated 2 Aug 2026
A service deployed on Linux EC2 instances in an Auto Scaling group sometimes crashes due to an application bug, and a full fix may take weeks. The SysOps administrator must implement an automated recovery mechanism so that the service is restarted if it stops on any instance. Which of the following solutions meet this requirement? (Select two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Install and configure the Amazon CloudWatch agent on the EC2 instances to monitor the service and set the CloudWatch action to restart the service if its health check fails., Tag the instances and use AWS Systems Manager State Manager to create an association that runs the AWS-RunShellScript document. Configure the script to check whether the service is running and start it if not, and schedule the association to run every 5 minutes for targets defined by the tag..
Why this is the answer
The CloudWatch agent can monitor service health and trigger an action to restart the service, providing an automated recovery. AWS Systems Manager State Manager, with an AWS-RunShellScript document, can periodically check service status and restart it if needed, targeting instances via tags. Both solutions offer automated, self-healing capabilities.
The Lambda function with Session Manager is less efficient for continuous monitoring and restarting, as it requires a scheduled external trigger and Session Manager overhead. Modifying user data for a cron job or just starting the service on boot are partial solutions; they don't actively monitor and restart a service that crashes after initial boot or cron setup.