A company intends to ensure non-production Amazon EC2 instances remain stopped overnight. The IT manager must get near real-time notifications whenever an EC2 instance tagged as environment=non-production is started during the night. Which solution provides this behavior with the LEAST operational overhead?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an EventBridge rule for EC2 Instance State-change Notification events filtered for the running state. Use a Lambda target that checks the current time and the instance's tags, then publish to an SNS topic. Subscribe the IT manager's email to that SNS topic..
Why this is the answer
The correct solution leverages EventBridge, Lambda, and SNS for a near real-time, low-overhead approach. EventBridge can directly capture EC2 state-change notifications, specifically filtering for the "running" state. A Lambda function then processes these events, checking the instance's tags (environment=non-production) and the current time to determine if it's during the night. If conditions are met, it publishes a message to an SNS topic, which then emails the IT manager. This is efficient because it's event-driven, not polling. Incorrect options: The Lambda function using an SMTP library and Pinpoint is overly complex and doesn't directly address EC2 state changes efficiently. AWS Health Dashboard is for service health, not individual EC2 instance state changes. A second Lambda for throttling adds unnecessary complexity. Periodically querying the EC2 API via a Lambda and EC2 instance scheduler is a polling mechanism, which is less efficient and has higher overhead than event-driven solutions for near real-time needs. Storing metadata in DynamoDB and running a custom application on an EC2 instance is a highly manual and resource-intensive polling solution with significant operational overhead compared to native AWS eventing services.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed