When EC2 in the same account and Region enters stopped, start a prepared Systems Manager Automation runbook including notifications. The runbook requires InstanceId; the necessary IAM roles are ready.
Avoid periodic polling and pass the affected instance ID into the procedure.
Choose TWO appropriate components.
Match the EC2 stopped event with an EventBridge rule and target the Automation runbook. Pass the event's instance ID as input and configure invocation and procedure permissions.
Detailed explanation
Periodic checks do not directly react to the required state-change event.
Periodic checks do not directly react to the required state-change event.
The event structure differs from the runbook input names and types. Passing the whole event alone does not supply its required InstanceId parameter.
The event structure differs from the runbook input names and types. Passing the whole event alone does not supply its required InstanceId parameter.
Detailed monitoring changes metric frequency; it does not connect the state event to a runbook.
Detailed monitoring changes metric frequency; it does not connect the state event to a runbook.
The event pattern detects the required transition without polling.
The event pattern detects the required transition without polling.
This starts the prepared procedure. Configure target input and the required execution roles.
This starts the prepared procedure. Configure target input and the required execution roles.
Check official documentation
Compare the following points with the official documentation.
Review EventBridge targets, Automation input parameters, and IAM roles.
Official references
What to confirm
Connect an EC2 stopped event to the correct runbook input and execution permissions.
Key points
- EventBridge
- EC2 state-change event
- SSM Automation
Notes
- Environment: AWS SOA-C03 exam guide and the linked AWS documentation
- Reviewed against the linked AWS documentation on 2026-10-08.
Foundation review
Connect the event to the procedure
Match source aws.ec2, detail-type EC2 Instance State-change Notification, and detail.state stopped. Extract the ID from $.detail.instance-id and transform it to the runbook input names and types, including required InstanceId. Selecting a target alone does not supply every required input. Test the transformation with a sample event.
Separate permissions
Distinguish EventBridge permission to start Automation from permissions used by the runbook notification and resource operations. Scope them to required actions and inspect execution results.