Deployment, Provisioning, and Automation
An operations team must invoke a Lambda function whenever an EC2 instance enters the stopped state, without polling. What should the team configure?
Show the answer
Correct answerC. An EventBridge rule matching EC2 state-change events with state stopped
AWhy not this: A scheduled association performs periodic management work rather than reacting directly to an EC2 state-change event.
BWhy not this: Low CPU utilization does not establish that an instance has entered the stopped state.
CWhy this is right: EC2 emits state-change events that EventBridge can filter for the stopped state and route to Lambda.
DWhy not this: A recurring schedule is time-driven and would require polling to determine instance state.
An EventBridge event pattern can match EC2 Instance State-change Notification events whose state is stopped. A schedule invokes on a time basis rather than in response to a state transition.