AWS Certified CloudOps Engineer Associate SOA-C03 Practice Question
A SysOps team created a Bash script that clears application cache and restarts a service. When CPU utilization on an Amazon EC2 instance stays above 90% for 5 minutes, the team wants Amazon CloudWatch to invoke Systems Manager Automation to run this script on the affected instance. Which solution meets the requirement with the least operational overhead?
Add the Bash script to the EC2 user-data field and schedule a cron job inside the instance; set the CloudWatch alarm to reboot the instance to force the script to run.
Create a custom SSM Automation document of type Automation that includes a single aws:runCommand step referencing the AWS-RunShellScript command document with the Bash script inline, and configure the CloudWatch alarm to start this runbook against the instance.
Develop an AWS Lambda function that executes the script by using the SSM send-command API, and have the CloudWatch alarm invoke the function.
Configure a State Manager association that runs the Bash script with the AWS-RunShellScript document and set the CloudWatch alarm to publish an SNS notification that triggers the association.
The simplest approach is to create a custom Systems Manager Automation runbook (document type Automation). The runbook contains one aws:runCommand step that calls the pre-built AWS-RunShellScript command document and passes the Bash commands inline. A CloudWatch alarm can be configured to invoke this Automation runbook directly, targeting the instance by its Amazon Resource Name or by a resource tag. Using State Manager, Lambda, or user-data scripts either does not run on demand or requires additional components that add unnecessary complexity.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Systems Manager Automation runbook?
Open an interactive chat with Bash
What does the AWS-RunShellScript document do?
Open an interactive chat with Bash
How does a CloudWatch alarm trigger a Systems Manager Automation runbook?
Open an interactive chat with Bash
AWS Certified CloudOps Engineer Associate SOA-C03
Monitoring, Logging, Analysis, Remediation, and Performance Optimization
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .