Soru

Zorluk: KolayEvent-Driven Automation and Operational Responses

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?

  1. A
    Configure 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.
  2. B
    Enable detailed monitoring on all EC2 instances to capture state changes, and configure a CloudWatch metric filter to trigger the Amazon SNS notification.
  3. 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
  4. D
    Create 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

1
Identify the event source and trigger mechanism for EC2 state changes.
Amazon EC2 natively emits state-change events to Amazon EventBridge when instances transition between states (such as running, stopping, and stopped).
EventBridge is the standard AWS service for capturing and responding to resource state changes in real time.
2
Configure the Amazon EventBridge rule target.
Define the target of the EventBridge rule as the designated Amazon SNS topic.
EventBridge integrates directly with Amazon SNS, allowing it to send event payloads to the topic without requiring intermediary compute resources such as AWS Lambda or Systems Manager Automation.

Anahtar Kavram

Utilizing Amazon EventBridge to route native EC2 state-change events directly to Amazon SNS for low-overhead notifications.
Tahmini Süre:45s
Bu soruyu puanla