What is the MOST operationally efficient solution that meets these requirements?
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.
Create an Amazon EventBridge event rule that captures EC2 instance state changes. Set an Amazon Simple Notification Service (Amazon SNS) topic as the target
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.
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.
Explanations:
This option requires the creation of a custom script and running it on each EC2 instance, which is not operationally efficient. It involves manual setup and maintenance for each instance, increasing complexity and overhead.
Using Amazon EventBridge to capture EC2 instance state changes and directly target an Amazon SNS topic is efficient and automated. It requires minimal setup, and notifications are sent directly without needing additional components or scripts.
While this option captures state changes with EventBridge, it involves an unnecessary AWS Lambda function as an intermediary to send notifications to SNS. This adds complexity and potential points of failure, making it less efficient than option B.
Although AWS Config can evaluate changes and trigger notifications, it is more complex than necessary for this requirement. This solution also introduces additional overhead with custom rules and remediation processes that are not required for simply notifying state changes.