An organization wants to automatically send a notification to an Amazon SNS topic whenever an Amazon EC2 instance changes its state to 'stopped'. Which event-driven solution should a SysOps administrator implement to meet this requirement with the least operational overhead?
- AConfigure an AWS Config rule to monitor the EC2 instance state, and configure an AWS Systems Manager Automation document as a remediation action to publish a message to the SNS topic.
- BEnable detailed monitoring on all EC2 instances to capture state changes, and configure a CloudWatch metric filter to trigger the Amazon SNS notification.
- Create an Amazon EventBridge rule that filters for EC2 Instance State-change Notification events with a state of stopped, and set the target to the Amazon SNS topic.Cevap
- DCreate an IAM role with the iam:PassRole permission to allow the EC2 instances to directly notify the Amazon SNS topic upon transition to the stopped state.
Cevap
Create an Amazon EventBridge rule that filters for EC2 Instance State-change Notification events with a state of stopped, and set the target to the Amazon SNS topic.
Amazon EventBridge natively monitors EC2 instance state changes as events. A rule filtering for the 'stopped' state can target an Amazon SNS topic directly, providing a simple, serverless, and low-overhead event-driven solution.
Adım Adım Çözüm
Anahtar Kavram
Utilizing Amazon EventBridge to route native EC2 state-change events directly to Amazon SNS for low-overhead notifications.
Tahmini Süre:45s