
Answer-first summary for fast verification
Answer: Amazon EventBridge
## Explanation Amazon EventBridge is the correct service for this requirement because: - **EventBridge** is designed specifically for event-driven architectures and can respond to AWS service events, including EC2 instance state changes - It can directly trigger Lambda functions when specific events occur, such as an EC2 instance entering the stopping state - EventBridge provides a native integration with AWS Lambda as a target for event rules While other services might have some capability: - **AWS Config** can detect configuration changes but is primarily for compliance and auditing, not direct Lambda invocation - **Amazon SNS** is for pub/sub messaging and would require additional setup to monitor EC2 state changes - **AWS CloudFormation** is for infrastructure as code and doesn't directly handle event-driven Lambda invocation EventBridge is the most direct and appropriate service for invoking Lambda functions in response to AWS service events like EC2 state transitions.
Author: Ritesh Yadav
Ultimate access to all questions.
A company needs to use an AWS service to invoke an AWS Lambda function when an Amazon EC2 instance enters the stopping state. Which AWS service will meet this requirement?
A
Amazon EventBridge
B
AWS Config
C
Amazon Simple Notification Service (Amazon SNS)
D
AWS CloudFormation
No comments yet.