AWS Certified CloudOps Engineer Associate SOA-C03 Practice Question
A Lambda function is invoked by an Auto Scaling lifecycle hook when a new Amazon EC2 instance launches. The function must install the latest CloudWatch agent by calling the AWS-provided Systems Manager document AWS-ConfigureAWSPackage, passing the instance ID, and wait until the operation finishes before completing the lifecycle action. Which AWS SDK API should the function invoke to meet these requirements with minimal custom code?
Call the Systems Manager SendCommand API and poll the command until the status is Success.
Call the Systems Manager StartAssociationsOnce API to apply the AWS-ConfigureAWSPackage association to the instance.
Call the Systems Manager StartAutomationExecution API and track the execution until it completes.
Call the Systems Manager CreateDocument API to upload AWS-ConfigureAWSPackage and rely on the lifecycle hook to continue after the upload succeeds.
AWS-ConfigureAWSPackage is a Command document used by Systems Manager Run Command. The Lambda function should call SendCommand, which accepts the document name, the target instance ID, and parameters like action=Install and name=AmazonCloudWatchAgent. SendCommand returns a command ID that the function can poll (for example with ListCommandInvocations or GetCommandInvocation) until the status becomes Success before completing the lifecycle hook. StartAutomationExecution is only for Automation runbooks, StartAssociationsOnce applies State Manager associations once, and CreateDocument merely uploads or registers a document; none of those actions execute this document.
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 the Systems Manager SendCommand API?
Open an interactive chat with Bash
What is a Command document in the context of AWS Systems Manager?
Open an interactive chat with Bash
How can a Lambda function poll for command status after invoking SendCommand?
Open an interactive chat with Bash
What is the AWS Systems Manager SendCommand API?
Open an interactive chat with Bash
What is the difference between Command documents and Automation runbooks in Systems Manager?
Open an interactive chat with Bash
How does the Lambda function poll for the SendCommand API's status?
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 .