CLF-C02 Practice Question 97: Event Routing Scheduling
AWS Certified Cloud Practitioner (CLF-C02) · Test 10 · question 7 of 10
A company wants to run an AWS Lambda function every night at 2 AM to generate reports. It also wants a different Lambda function to run automatically whenever one of its Amazon EC2 instances changes state. The company does not want to run any servers or polling scripts to detect these events. Which service should it use?
Show answer and explanation
Answer:
Amazon EventBridge is a serverless service for building event-driven applications. Its event buses receive events from sources including AWS services, your own applications and third-party SaaS products, and route them to targets such as Lambda functions based on rules. An EC2 instance state change is exactly this kind of AWS service event. EventBridge Scheduler creates schedules from cron or rate expressions, which covers the nightly 2 AM run. Neither needs any servers or polling.
Option A, Amazon SQS, is a queue that consumers poll. It doesn't generate a nightly trigger and doesn't receive EC2 state-change events on its own. Option B, a CloudWatch metric alarm, reacts when a *metric* crosses a threshold. It is not a time-based schedule or a router for resource state-change events. Option C, AWS Step Functions, orchestrates the steps *inside* a workflow. Something else, such as EventBridge, still has to start that workflow on a schedule or in response to an event.
Reference: What Is Amazon EventBridge?