
Explanation:
Option B is the correct answer.
Amazon EventBridge (formerly CloudWatch Events) natively integrates with Amazon EC2 instance state changes (e.g., pending, running, stopping, stopped, shutting-down, terminated). You can simply create an EventBridge rule that triggers on the EC2 Instance State-change Notification event pattern and set an Amazon SNS topic directly as the target. This is a completely serverless, managed approach requiring zero custom code.
Option C introduces an unnecessary AWS Lambda function just to publish to SNS, adding complexity and cost. Option A involves custom scripts which are highly operationally inefficient to maintain and ensure they are running on every instance. Option D is overly complex and misuses AWS Config. Config is designed for compliance auditing, not real-time operational event notifications like instance state changes.
Ultimate access to all questions.
Question 5.
A company runs its applications on a large number of Amazon EC2 instances. A SysOps administrator must implement a solution to notify the operations team whenever an EC2 instance state changes. What is the MOST operationally efficient solution that meets these requirements?
A
Create a script that captures instance state changes and publishes a notification to an Amazon Simple Notification Service (Amazon SNS) topic. Use AWS Systems Manager Run Command to run the script on all EC2 instances.
B
Create an Amazon EventBridge event rule that captures EC2 instance state changes. Set an Amazon Simple Notification Service (Amazon SNS) topic as the target.
C
Create an Amazon EventBridge event rule that captures EC2 instance state changes. Set as the target an AWS Lambda function that publishes a notification to an Amazon Simple Notification Service (Amazon SNS) topic.
D
Create an AWS Config custom rule that evaluates instance state changes with automatic remediation. Use the rule to invoke an AWS Lambda function that publishes a notification to an Amazon Simple Notification Service (Amazon SNS) topic.
No comments yet.