AWS CloudWatch Events / Amazon EventBridge

CloudWatch Events delivers a near-real-time stream of system events describing changes to AWS resources, plus scheduled events on a cron. As of 2026 it has been rebranded and extended as Amazon EventBridge — the same underlying service with added features like custom event buses, schema registry, SaaS integrations, and pipes. The CloudWatch Events APIs and rules continue to work and are managed alongside EventBridge.


Key Features:


Common Use Cases:


Service Limits & Quotas:


Pricing Model:


Code Example — Scheduled Rule + EC2 Auto-Stop:


# Stop tagged dev EC2s every weekday at 7pm PT
aws events put-rule \
  --name stop-dev-ec2-nightly \
  --schedule-expression "cron(0 2 ? * MON-FRI *)" \
  --state ENABLED

aws events put-targets --rule stop-dev-ec2-nightly --targets '[{
  "Id": "1",
  "Arn": "arn:aws:lambda:us-west-2:111122223333:function:StopDevInstances",
  "Input": "{\"tagKey\":\"Environment\",\"tagValue\":\"dev\"}"
}]'

aws lambda add-permission \
  --function-name StopDevInstances \
  --statement-id AllowEventBridge \
  --action lambda:InvokeFunction \
  --principal events.amazonaws.com \
  --source-arn arn:aws:events:us-west-2:111122223333:rule/stop-dev-ec2-nightly
  

Event Pattern (S3 PUT into a specific prefix):


{
  "source": ["aws.s3"],
  "detail-type": ["Object Created"],
  "detail": {
    "bucket": {"name": ["prod-uploads"]},
    "object": {"key": [{"prefix": "incoming/"}]}
  }
}
  


Common Interview Questions:

EventBridge vs. SNS — which to use?

SNS is a pub/sub notification service optimized for fan-out to many subscribers (HTTPS, email, SQS, Lambda) at very high throughput and low latency. EventBridge adds content-based filtering, schema, multiple buses, archive/replay, and SaaS integrations — at the cost of slightly higher latency and per-event price. Use EventBridge when you need filtering or schema; use SNS when you need pure broadcast.

EventBridge Rules vs. EventBridge Scheduler — which for scheduled jobs?

Scheduler is newer and recommended for new schedules: per-schedule IAM, one-time schedules, time zones, flexible windows, dead-letter queues, and millions of schedules per account. Rule-based schedules are limited to ~300 per bus and lack timezone/one-time support.

What's an EventBridge Pipe and when would you use it?

A managed point-to-point connection from one source (SQS, Kinesis, DynamoDB Streams, Kafka) to one target, with optional filter and enrichment. Replaces Lambda glue functions whose only job is to read from a stream, transform, and forward.

How do you handle event delivery failures?

Configure a dead-letter queue (SQS) on the rule target. EventBridge retries with exponential backoff for up to 24 hours; failed deliveries land in the DLQ for manual or automated reprocessing. Archive + Replay can also re-emit historical events.

How do you share events across AWS accounts?

Add a resource policy to the destination bus that allows the producer account's events:PutEvents action. The producer puts events on its own bus with a target that is the destination bus ARN in the consumer account.

What's the maximum event size and how do you handle larger payloads?

256 KB. For larger payloads, store the data in S3 and put only the S3 reference (bucket + key) into the event, then have consumers fetch from S3 — the standard claim-check pattern.