
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
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
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.