Cloud / Amazon EventBridge Interview questions
Last updated
1. What is Amazon EventBridge?
Amazon EventBridge is a serverless event bus from AWS. It receives events from AWS services, your own applications and SaaS partners, and routes them to targets based on rules you define. Services can react to each other without calling each other directly.
A producer publishes an event to a bus, rules compare it against event patterns, and every matching rule delivers it to its targets, such as Lambda, SQS, SNS or Step Functions. There is nothing to provision and capacity scales automatically.
The service also bundles Scheduler for time-based invocations, Pipes for point-to-point integrations, a Schema Registry, and archive and replay.
Take quiz
Converts it into a relational table row
Stores it permanently in S3 for SQL queries
Matches it against rules and routes it to targets
Serverless, with no brokers to size or patch
It needs a dedicated Kafka cluster per bus
You provision and size broker instances yourself
2. What is an event in EventBridge?
An event is a JSON document that records something that already happened, such as an EC2 instance entering the stopped state or a customer placing an order. It is a fact, not a command asking another service to do work.
Each event has a standard envelope (source, detail-type, time and so on) plus a free-form detail object that carries the payload. Producers publish without knowing who will consume the event.
Name events in the past tense, like OrderPlaced, so consumers treat them as notifications rather than instructions.
Take quiz
A JSON record of something that already happened
A request telling one specific service what to do
A binary chunk read from a stream by offset
PayInvoiceNow
InvoicePaid
RunPaymentJob
3. What is the structure of an EventBridge event?
Every event shares the same envelope, and only detail is free-form. Rules usually match on the envelope fields plus values inside detail.
| Field | Meaning |
version |
Event format version, set by EventBridge |
id |
Unique event ID generated by EventBridge |
detail-type |
Human-readable event type, for example OrderPlaced |
source |
Producer of the event, such as aws.ec2 or com.shop.orders |
account, region |
Where the event originated |
time |
Timestamp in UTC |
resources |
Optional list of ARNs the event is about |
detail |
JSON payload specific to the event |
{ "version": "0", "id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718", "detail-type": "OrderPlaced", "source": "com.shop.orders", "account": "111122223333", "time": "2026-10-02T09:15:00Z", "region": "us-east-1", "resources": [], "detail": { "orderId": "A-1001", "total": 249.5 } }
Take quiz
detail-type
detail
resources
The IAM role used for delivery
The target that will receive it
The service or application that produced the event
4. What is an event bus in Amazon EventBridge?
An event bus is the pipeline that receives events and hands them to rules. Producers send events to a bus, and the rules attached to that bus decide which targets get each event.
Each bus has its own ARN, its own set of rules and its own resource-based policy. That policy is what allows other accounts or an AWS Organization to put events on the bus.
Every account has one default bus per Region, and you can add as many custom buses as you need.
Take quiz
An S3 bucket
An individual Lambda function
An event bus
The bus resource-based policy
The Lambda execution role of the consumer
The target's dead-letter queue
5. What are the types of event buses in EventBridge?
EventBridge has three kinds of event buses, and they differ mainly in who sends events to them.
| Bus type | Receives events from | Notes |
| Default | AWS services in your account | One per account per Region, cannot be deleted |
| Custom | Your own applications or other buses | Created by you, one per domain or team is common |
| Partner | A SaaS partner event source | Created when you associate a partner event source with your account |
Rules and resource policies work the same way on all three. Scheduled rules are the exception, since they only exist on the default bus.
Take quiz
The default bus
A custom bus named after the Region
A partner event bus
A partner event bus
A custom event bus
Only the default bus, since custom buses cannot be created
6. What is a rule in EventBridge?
A rule watches a single event bus and sends matching events to one or more targets. It is the routing logic: a filter on one side, a list of targets on the other.
There are two kinds. An event pattern rule matches events by their content. A scheduled rule fires on a rate or cron expression and only exists on the default bus.
A rule can have up to five targets, can be enabled or disabled without deleting it, and can reshape the event with an input transformer before delivery.
Take quiz
Exactly one
Up to five
No limit at all
Only on partner event buses
On any custom bus
Only on the default bus
7. What is an event pattern in EventBridge?
An event pattern is a JSON filter that mirrors the shape of the event you want to match. Each field you list must match, and each field you leave out is ignored.
Pattern values are always arrays. Several values in one array are treated as OR, while several fields are treated as AND. Matching is case-sensitive.
{ "source": ["com.shop.orders"], "detail-type": ["OrderPlaced"], "detail": { "status": ["PAID", "SHIPPED"] } }
Take quiz
AND, so both must match
Only the first value is used
OR, so either source matches
Ignored during matching
Required to be empty
Required to exist with any value
8. What are targets in EventBridge?
A target is the resource that EventBridge calls when an event matches a rule. Common targets include Lambda, SQS, SNS, Step Functions, Kinesis, Firehose, ECS tasks, API Gateway, CloudWatch Logs, another event bus, and external HTTP endpoints through API destinations.
Permissions depend on the target type:
| Target | How EventBridge gets permission |
| Lambda, SQS, SNS | Resource-based policy on the target |
| Step Functions, ECS, Kinesis, API Gateway, other buses | IAM role that the rule assumes |
Each target can also have its own input settings, retry policy and dead-letter queue.
Take quiz
A resource-based policy on the function
An S3 bucket policy
A Route 53 hosted zone record
A Route 53 hosted zone record
Another event bus
An IAM user's access key
9. What are the event sources supported by EventBridge?
EventBridge accepts events from four main places.
- AWS services, which publish state changes to the default bus automatically and at no charge, for example EC2, S3, CodePipeline and GuardDuty.
- Your applications, which call
PutEventsthrough an SDK or the CLI. - SaaS partners, such as Zendesk or Datadog, through partner event sources.
- Other event buses, in the same or another account or Region.
Calls recorded by CloudTrail also arrive as events, which lets you react to almost any AWS API call.
Take quiz
AWS services on the default bus
Your own application code
SaaS partner event sources
The partner event bus
A custom bus you create per service
The default bus
10. What is the relationship between EventBridge and CloudWatch Events?
EventBridge is the evolution of CloudWatch Events. Both use the same underlying service and the same API namespace, so the aws events CLI commands and the AWS::Events::Rule resource type are unchanged.
Rules you created in CloudWatch Events show up in EventBridge as rules on the default bus, and rules you create in the EventBridge console appear in the older console too. Nothing needs to be migrated, and existing targets keep working.
EventBridge adds the things the original did not have: custom and partner buses, the Schema Registry, archive and replay, API destinations, Pipes and Scheduler.
Take quiz
A separate legacy service to migrate to
Deleted rules that must be recreated
Rules on the default bus
Partner event sources
Cron-based scheduled rules
The default event bus
11. How do you send custom events to EventBridge?
Call the PutEvents API from an SDK, the CLI or any service that can sign AWS requests. Each entry needs a Source, a DetailType and a Detail JSON string, and you can name the target bus with EventBusName.
import boto3, json events = boto3.client("events") resp = events.put_events(Entries=[{ "EventBusName": "orders-bus", "Source": "com.shop.orders", "DetailType": "OrderPlaced", "Detail": json.dumps({"orderId": "A-1001", "total": 249.5}) }]) print(resp["FailedEntryCount"])
A request can carry up to 10 entries, and the whole request must stay under 256 KB. PutEvents can return HTTP 200 while individual entries fail, so always check FailedEntryCount and retry the failed ones. Sources starting with aws. are reserved.
Take quiz
FailedEntryCount in the response
Only the CloudTrail log for the call
Nothing, since 200 means every entry was accepted
EventBusName and Time
Source, DetailType and Detail
Only Detail
12. How do you trigger a Lambda function from an EventBridge rule?
Create a rule with an event pattern, add the function as a target, and let the function's resource policy allow events.amazonaws.com to invoke it. The console adds that permission for you. With the CLI or IaC you add it yourself.
aws events put-rule --name order-paid \ --event-pattern '{"source":["com.shop.orders"],"detail-type":["OrderPaid"]}' aws lambda add-permission --function-name process-order \ --statement-id eb-order-paid --action lambda:InvokeFunction \ --principal events.amazonaws.com \ --source-arn arn:aws:events:us-east-1:111122223333:rule/order-paid aws events put-targets --rule order-paid \ --targets "Id"="1","Arn"="arn:aws:lambda:us-east-1:111122223333:function:process-order"
EventBridge invokes Lambda asynchronously, and the whole event becomes the function's input. Lambda's own async retry settings and failure destinations then apply.
Take quiz
By having Lambda poll the bus
Asynchronously, passing the event as input
Synchronously, waiting for the return value
Lambda needs permission to read the event bus
The rule executes inside the function's runtime
The function's resource policy must allow EventBridge to call it
13. What is EventBridge Scheduler?
EventBridge Scheduler is a serverless scheduler for running one-time or recurring tasks at scale. You define a schedule, a target and an optional payload, and it calls the target on time.
It supports at() one-time expressions, rate() and cron(), with time zone and daylight saving support. A flexible time window can spread invocations to avoid spikes, and schedules live in schedule groups.
Scheduler can call a very wide range of AWS API actions directly as universal targets, and it has retry policies and dead-letter queues. It is built to hold millions of schedules, such as one reminder per customer.
Take quiz
cron() expressions
rate() expressions
One-time at() schedules
Spreads invocations across a window to avoid spikes
Keeps schedules alive after deletion
Extends the retention of archived events
14. What is EventBridge Pipes?
EventBridge Pipes connects one source to one target with optional filtering and enrichment in between. It removes the glue Lambda code you would otherwise write to move messages between services.
flowchart LR S[Source] --> F[Filter] F --> E[Enrichment] E --> T[Target]
Supported sources include SQS, Kinesis, DynamoDB Streams, Amazon MSK, self-managed Kafka and Amazon MQ. Enrichment can be Lambda, Step Functions, API Gateway or an API destination, and targets cover most EventBridge target types.
Pipes polls the source and handles batching and retries for you. Unlike a bus, it is strictly point-to-point.
Take quiz
Source, filter, enrichment, target
Enrichment, source, filter, target
Source, target, filter, enrichment
An S3 bucket listing
A DynamoDB stream
A CloudFront distribution
15. What is the EventBridge Schema Registry?
The Schema Registry stores the structure of your events so developers can discover and reuse it. Schemas are saved in OpenAPI 3 or JSON Schema Draft 4 format and are versioned.
Schemas for AWS service events are already there. For your own events you can turn on schema discovery on a bus, and EventBridge infers a schema from the traffic it sees and creates a new version when the shape changes.
From a schema you can download code bindings for languages like Java, Python and TypeScript. That gives you typed classes for events instead of hand-written JSON parsing.
Take quiz
Blocks events that do not match a pattern
Infers schemas from events passing through a bus
Encrypts event payloads at rest
A replay of archived events
A cross-account bus policy
Typed classes generated from an event schema
16. What is an event archive in EventBridge?
An archive stores copies of events from a bus so they can be replayed later. You create it for one bus, choose a retention period in days or keep events indefinitely, and optionally add an event pattern so only some events are kept.
Archiving is useful for recovering from a bug in a consumer, seeding a new environment with realistic traffic, or auditing what flowed through a bus.
Archives are billed for storage and ingestion, so filter with a pattern instead of archiving everything by default.
Take quiz
A target Lambda function for each event
A cron schedule for deleting the bus
A retention period and an optional event pattern
To store and pay for only the events you may need
Because unfiltered archives cannot be replayed
To make events arrive in order
17. What is event replay in EventBridge?
Replay re-sends archived events from a chosen time range back to the bus they came from. You can send them to all rules or limit the replay to specific rules.
Replayed events keep their original time and gain a replay-name field, so consumers and rules can tell them apart from live traffic. Replays are not instantaneous, and ordering is not guaranteed.
Because side effects will run again, consumers must be idempotent. Scoping the replay to one rule is the safest way to rerun just the consumer you fixed.
Take quiz
replay-name
retry-count
archive-id
Delete the archive and republish live
Limit the replay to that consumer's rule
Replay to every rule on the bus
18. What are partner event sources in EventBridge?
A partner event source lets a supported SaaS provider, such as Zendesk, Datadog or Auth0, send events straight to your account. The provider creates the source, you accept it, and EventBridge gives you a partner event bus, with a name that starts with aws.partner/.
You then write rules on that bus like any other. This avoids running webhooks receivers or polling the SaaS API.
Events flow one way, from the partner into your account. The partner's own AWS account is never given access to your resources.
Take quiz
An IAM user for the provider
A partner event bus you can attach rules to
A VPC peering link to the provider
saas.events/
custom.partner/
aws.partner/
19. What are API destinations in EventBridge?
API destinations let a rule call any HTTPS endpoint, including SaaS APIs or on-premises services, as if it were a native target. You define a connection that holds the authentication, and a destination that holds the URL, HTTP method and rate limit.
Connections support basic auth, API keys and OAuth client credentials. Credentials are stored in AWS Secrets Manager and are not exposed in the rule.
Because the endpoint is outside AWS, the destination has a configurable invocation rate limit to protect it, and the request has a short timeout of about five seconds.
Take quiz
In the SQS dead-letter queue
In the event pattern
In a connection
Protecting the external endpoint from being overwhelmed
Limiting how many rules a bus can hold
Controlling archive retention
20. What is an input transformer in EventBridge?
An input transformer reshapes the event before it reaches a target. You pick values with input paths and compose the output with an input template.
Input path: { "orderId": "$.detail.orderId", "total": "$.detail.total" } Input template: { "message": "Order <orderId> paid, total <total>" }
This is handy for sending a clean message to SNS or SQS, or for shaping the body that an API destination receives, without adding a Lambda in between. The result must be valid for the target, so remember that unquoted placeholders are inserted as raw JSON.
Take quiz
Extracts values from the event into variables
Selects which bus receives the event
Sets the retry attempts for the target
To compress events for archiving
To shape the payload for a target without extra code
To authenticate API destinations
21. What are the key EventBridge quotas to know?
Exact numbers differ by Region and many are adjustable in Service Quotas, so check the current values before you design around them. These are the ones that come up most often.
| Limit | Typical default |
| Event size | 256 KB per entry |
Entries per PutEvents request |
10 |
| Targets per rule | 5 |
| Retry window for a failed delivery | Up to 24 hours or 185 attempts |
| Rules per event bus | A few hundred, adjustable |
The 256 KB cap pushes large payloads to S3 with the event carrying a pointer (the claim-check pattern). The five-target cap is why fan-out to many consumers often uses SNS or several rules.
Take quiz
4 KB
256 KB
64 MB
1
50
5
22. What is the difference between EventBridge and SNS?
Both fan events out to multiple consumers, but they are tuned for different jobs. SNS is a high-throughput, low-latency pub/sub service. EventBridge is a content-based event router with a much richer ecosystem.
| SNS | EventBridge |
| Topics with subscriber filter policies | Buses with rules and rich event patterns |
| Very high throughput, latency in tens of milliseconds | Latency typically around half a second |
| Delivers to SMS, email, mobile push, HTTP, SQS, Lambda | Delivers to many AWS services, other buses, API destinations |
| No archive or replay | Archive, replay, schema registry |
| Receives only what you publish | Also receives AWS service and SaaS partner events |
Pick SNS for high-volume notifications and human-facing channels. Pick EventBridge for routing domain events and reacting to AWS or SaaS events. They also combine well, for example a rule targeting an SNS topic.
Take quiz
EventBridge
Both identically through rules
SNS
EventBridge
SNS
Neither, you must publish them yourself
23. What is the difference between EventBridge and SQS?
SQS is a queue, and EventBridge is a router. SQS stores messages until a consumer pulls and deletes them. EventBridge pushes events to targets as they match and does not hold them for consumers.
| SQS | EventBridge |
| Pull model, consumers poll | Push model, targets are invoked |
| Buffers messages up to 14 days | Retries failed delivery for up to 24 hours |
| Competing consumers share one stream of work | Every matching rule receives its own copy |
| No content-based routing | Content-based routing with event patterns |
The usual design puts them together: a rule routes events to an SQS queue so each consumer gets buffering, back-pressure and its own dead-letter queue.
Take quiz
SQS
SNS filter policies
EventBridge rules
Archive the queue into an event bus
Route events from a rule into an SQS queue
Replace the queue with a scheduled rule
24. When should you choose EventBridge over Kinesis Data Streams?
Choose EventBridge when you have discrete business or infrastructure events that should be routed by content to different targets. Choose Kinesis when you have a continuous, high-volume stream where order and position matter.
| Need | Better fit |
Route OrderPlaced to billing and email differently |
EventBridge |
| React to AWS service state changes | EventBridge |
| Ordered records per partition key | Kinesis |
| Multiple consumers reading by offset, re-reading old data | Kinesis |
| Millions of clickstream records per second | Kinesis |
They are not exclusive. EventBridge Pipes can read from a Kinesis stream, filter it and push selected records to a bus.
Take quiz
Routing a SaaS webhook event
Ordered clickstream records per partition key
Reacting to an EC2 state change
An archive
The Schema Registry
EventBridge Pipes
25. How does EventBridge match events against rule patterns?
EventBridge compares the event's JSON to each rule's pattern field by field. All listed fields must match, and values in one array are OR-ed. Matching is on the JSON as sent, so a string "100" does not match a number 100.
Beyond exact values you can use content filters:
| Operator | Example |
| prefix | {"prefix": "order-"} |
| suffix | {"suffix": ".png"} |
| anything-but | {"anything-but": ["TEST"]} |
| numeric | {"numeric": [">", 100]} |
| exists | {"exists": true} |
| cidr | {"cidr": "10.0.0.0/24"} |
| wildcard, equals-ignore-case | {"wildcard": "eu-*"} |
The $or operator combines conditions across different fields. Use it sparingly, because very complex patterns are hard to review.
Take quiz
prefix
cidr
exists
The number 150
Exactly 100
The string "150" only
26. What happens when multiple rules match the same event?
Each matching rule fires independently, and the event is delivered to every target of every matching rule. There is no priority, no first-match-wins, and no ordering between rules.
That is what makes fan-out simple: add another rule and a new consumer starts receiving the same events. It is also why overlapping patterns can cause surprises, especially if two rules point at the same target and it receives the event twice.
If you want an exclusive path, write patterns that cannot overlap, for example by using anything-but on the catch-all rule.
Take quiz
Both rules deliver the event to their targets
Only the oldest rule fires
EventBridge rejects the event as ambiguous
Raise the rule's priority number
Make the patterns non-overlapping, for example with anything-but
Disable the default bus
27. Explain the execution flow of an event from PutEvents to a target?
The producer calls PutEvents and EventBridge authenticates the request and checks IAM or the bus resource policy. The event is accepted onto the bus and then evaluated against every rule on that bus.
sequenceDiagram
participant P as Producer
participant B as Event bus
participant R as Rules
participant T as Target
participant D as DLQ
P->>B: PutEvents
B->>R: Evaluate patterns
R->>T: Transform input and deliver
alt delivery fails
R->>T: Retry with backoff
R->>D: Send after retries are exhausted
end
- Matching rules apply their input transformer or input path.
- EventBridge invokes each target with the rule's role or the target's resource policy.
- On failure it retries according to the retry policy.
- If a dead-letter queue is set, the failed event goes there, otherwise it is dropped.
Take quiz
It is written to a queue waiting for a consumer to poll
The event is evaluated against the rules on that bus
It is copied to every bus in the account
To the archive automatically
Back onto the bus as a new event
To the dead-letter queue
28. How does EventBridge handle retries and failed deliveries?
When a target call fails with a retriable error, EventBridge retries with exponential backoff and jitter. By default it keeps trying for up to 24 hours and up to 185 attempts, whichever limit comes first.
You can tune this per target with a retry policy: MaximumEventAgeInSeconds from 60 to 86400 and MaximumRetryAttempts from 0 to 185. Some errors, such as a deleted target or missing permission, are not worth retrying and fail quickly.
If delivery still fails and no dead-letter queue is set, the event is dropped. For Lambda, EventBridge considers the delivery complete once Lambda accepts the async invocation, so function failures are handled by Lambda's own retries and destinations.
Take quiz
Three attempts over five minutes
Unlimited attempts until success
Up to 24 hours or 185 attempts
It is dropped after retries end
It is replayed automatically each hour
It is stored on the bus indefinitely
29. How do you configure a dead-letter queue for an EventBridge target?
Set a DeadLetterConfig on the target, not on the rule, pointing to a standard SQS queue. Then give EventBridge permission to send messages to it.
{ "Sid": "AllowEventBridgeToSendToDLQ", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": "sqs:SendMessage", "Resource": "arn:aws:sqs:us-east-1:111122223333:orders-dlq", "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:events:us-east-1:111122223333:rule/orders-bus/order-paid" } } }
FIFO queues are not supported as the DLQ. Failed messages arrive with attributes such as ERROR_CODE and ERROR_MESSAGE, which makes triage much easier. Alarm on the queue depth so failures do not sit unnoticed.
Take quiz
On the individual target
On the event pattern
On the event bus
A FIFO SQS queue
A standard SQS queue
A Kinesis stream
30. Why doesn't EventBridge guarantee ordering or exactly-once delivery?
EventBridge is a distributed, highly available service that favours durability and scale over strict ordering. It delivers at least once, so a target can occasionally see the same event twice, and events can arrive out of order.
Retries make this worse. If event A fails and is retried while event B succeeds, B reaches the target first. Replays and overlapping rules add more duplicates.
Design for it instead of fighting it: make consumers idempotent, carry a sequence number or timestamp in detail when order matters, and use Kinesis or SQS FIFO when strict ordering is a hard requirement.
Take quiz
Exactly once, always
At least once
At most once, never retried
Move all events to the default bus
Disable retries on all targets
Make consumers idempotent
31. How do you make EventBridge consumers idempotent?
Give every business operation a stable key and make the handler safe to run twice. The EventBridge id works for deduplicating redeliveries, but a business key such as orderId also covers a producer that publishes the same fact twice.
- Read the key from the event, for example
detail.orderIdplus event type. - Do a conditional write to a store, like a DynamoDB
PutItemwithattribute_not_exists. - If the write fails because the key exists, skip the work and return success.
- Expire old keys with a TTL.
Powertools for AWS Lambda has an idempotency utility that does this with a DynamoDB table. Side effects that are naturally idempotent, such as setting a status to PAID, need no extra guard.
Take quiz
A global secondary index scan
DynamoDB Streams alone
A conditional write with attribute_not_exists
A producer may publish the same fact twice with different event ids
Event ids are always identical on redelivery
The event id cannot be read by Lambda
32. How do you deliver EventBridge events to a FIFO SQS queue?
Add the FIFO queue as a rule target and set the MessageGroupId in the target's SQS parameters. The group ID is mandatory for FIFO queues. Use a static value, or take it from the event with an input path such as $.detail.customerId.
{ "Id": "fifo-target", "Arn": "arn:aws:sqs:us-east-1:111122223333:orders.fifo", "SqsParameters": { "MessageGroupId": "orders" } }
The queue then preserves the order of messages it receives within each group. It cannot restore the order in which events were originally published, since EventBridge itself does not guarantee ordering. Also plan deduplication, for example by enabling content-based deduplication when identical payloads should be treated as duplicates.
Take quiz
MessageGroupId
A cron expression
VisibilityTimeout of 0
Message retention
Out-of-order arrival from EventBridge itself
Ordering within a message group on the queue
33. How does cross-account event delivery work in EventBridge?
Cross-account delivery is bus to bus. A rule in the source account targets the event bus in the destination account, and the destination bus allows it through a resource-based policy.
flowchart LR A["Account A bus"] -->|rule with bus target| B["Account B bus"] B --> C["Rules in Account B"] C --> D[Targets]
- In Account B, attach a bus policy that allows
events:PutEventsfrom Account A, or from an AWS Organization usingaws:PrincipalOrgID. - In Account A, create a rule whose target is Account B's bus ARN, with an IAM role allowed to call
PutEventson it. - In Account B, write rules that route the received events to local targets.
Account B pays for the events it receives as custom events, so agree on volume with the owning team first.
Take quiz
A shared Lambda layer
A resource-based policy on Account B's bus
A VPC peering connection
By enabling archive on the bus
By adding a wildcard to the event pattern
With the aws:PrincipalOrgID condition key
34. How does cross-Region event routing work in EventBridge?
A rule in one Region can target an event bus in another Region, using the same bus-as-target feature as cross-account routing. EventBridge uses an IAM role to call PutEvents on the destination bus.
Typical uses include aggregating events from many Regions into a central bus for security analysis, or copying events to a second Region for disaster recovery.
Remember that rules and targets are Regional. A Lambda in us-east-1 cannot be a direct target of a bus in eu-west-1, so route through a bus in each Region. Cross-Region delivery adds latency and is billed per forwarded event.
Take quiz
Enable a global archive
Create the same bus name and hope they sync
Use that bus as a rule target
Rules and targets are Regional resources
Targets only work with the default bus
Buses cannot receive events from IAM roles
35. How do EventBridge global endpoints improve availability?
A global endpoint pairs a primary and a secondary Region so event ingestion fails over automatically if the primary has a problem. Producers publish to the endpoint instead of a single Region's bus.
- Create identically named buses with the same rules in both Regions.
- Create the global endpoint with a Route 53 health check, usually driven by a latency metric alarm.
- Optionally turn on event replication so events are copied to the secondary bus.
- Publish with an SDK that supports SigV4A signing, passing the endpoint ID.
When the health check goes unhealthy, new events flow to the secondary Region. Consumers must therefore exist and be tested there, and idempotency matters even more because events can be replicated.
Take quiz
A Route 53 health check
A change to the event pattern
A manual archive replay
A shared dead-letter queue
Matching buses and rules
Identical Lambda concurrency limits only
36. What is the difference between EventBridge Scheduler and scheduled rules?
Both can fire on a schedule, but Scheduler is the newer, more capable service and AWS recommends it for new work.
| Scheduled rules | EventBridge Scheduler |
| Default bus only | Its own service with schedule groups |
| UTC only | Time zones and daylight saving |
| Rate and cron | One-time at(), rate and cron |
| Limited set of targets | Universal targets covering most AWS APIs |
| Counts against rule quotas | Built for millions of schedules |
| No flexible window | Flexible time window to spread load |
Keep scheduled rules only where they already exist and work. For per-customer reminders, timeouts and one-off jobs, use Scheduler.
Take quiz
Scheduled rules
EventBridge Scheduler
Neither of them
A Lambda looping every minute
Scheduled rules on the default bus
EventBridge Scheduler
37. What is the difference between EventBridge Pipes and EventBridge rules?
A rule sits on a bus and fans one event out to up to five targets, matching by content. A pipe connects exactly one source to one target and also polls that source for you.
| Rules on a bus | Pipes |
| Events are pushed in by producers | Pipes polls SQS, Kinesis, DynamoDB Streams, Kafka, MQ |
| One event to many targets | One source to one target |
| No built-in enrichment step | Optional enrichment before the target |
| Decoupled, anyone can add a consumer | Tightly coupled by design |
Use a pipe to move queue or stream records to a target with light filtering and enrichment. Use a bus and rules when many independent consumers should react to the same event.
Take quiz
A rule on the default bus
A global endpoint
EventBridge Pipes
When many independent consumers should receive the same event
When you need to poll a Kafka topic
When exactly one source feeds one target
38. How do API destinations handle authentication and rate limiting?
Authentication lives in a connection. EventBridge supports basic authentication, API key headers and OAuth client credentials, and stores the secrets in AWS Secrets Manager. For OAuth it fetches and refreshes tokens automatically.
Rate limiting is set on the API destination as an invocation rate limit per second. Events beyond that rate are held and retried instead of overwhelming the endpoint.
EventBridge treats 429 and 5xx responses as retriable and honours a Retry-After header when present. Other 4xx responses are not retried. Pair it with a dead-letter queue so rejected events can be inspected.
Take quiz
In AWS Secrets Manager through the connection
In the rule's description
In the event detail
HTTP 401 on every call
HTTP 429
HTTP 404 on every call
39. How do you secure an Amazon EventBridge event bus?
Security is layered, from who can publish to who can read the data.
- IAM policies restrict who can call
PutEventsand who can create or change rules. - Bus resource policies restrict cross-account senders, ideally with
aws:PrincipalOrgIDor specific account IDs, never a bare wildcard principal. - Least-privilege roles for each rule target, scoped to the exact resource.
- KMS customer managed keys to encrypt events at rest on the bus.
- Interface VPC endpoints so private workloads can publish without internet access.
- CloudTrail to audit rule changes and publishers.
Also keep sensitive fields out of events. Send an identifier and let the consumer fetch the data it is entitled to see.
Take quiz
Sharing one IAM user's keys
A bus policy using aws:PrincipalOrgID
A policy with Principal set to * and no conditions
A public NAT-free event pattern
A partner event source
An interface VPC endpoint
40. How does EventBridge react to AWS API calls through CloudTrail?
Management API calls recorded by CloudTrail are delivered to the default bus as events with detail-type AWS API Call via CloudTrail. You match them on detail.eventSource and detail.eventName.
{ "source": ["aws.ec2"], "detail-type": ["AWS API Call via CloudTrail"], "detail": { "eventSource": ["ec2.amazonaws.com"], "eventName": ["TerminateInstances"] } }
This is a convenient way to alert on risky changes, tag new resources automatically, or trigger remediation. Data events, such as S3 object-level activity, need a CloudTrail trail that records them. Global-service events such as IAM are emitted in us-east-1, so create the rule there.
Take quiz
CloudTrail Digest Notification
EC2 Instance State-change
AWS API Call via CloudTrail
In us-east-1
Only on partner buses
In every Region at once
41. How do you monitor EventBridge with CloudWatch metrics?
EventBridge publishes metrics under the AWS/Events namespace, usually dimensioned by RuleName and EventBusName.
| Metric | What it tells you |
MatchedEvents |
Events that matched a rule |
TriggeredRules |
Rules that fired |
Invocations |
Target invocation attempts |
FailedInvocations |
Targets that could not be delivered to after retries |
ThrottledRules |
Rules throttled by service limits |
InvocationsSentToDlq / InvocationsFailedToBeSentToDlq |
DLQ handling outcomes |
IngestionToInvocationStartLatency |
Delay from ingestion to delivery start |
Alarm on FailedInvocations, on InvocationsFailedToBeSentToDlq, and on the DLQ's queue depth. A CloudWatch Logs target on a debug rule is a handy way to see the actual events.
Take quiz
FailedInvocations
TriggeredRules
MatchedEvents
Custom/EventBridge
AWS/Events
AWS/EventBus
42. How do you test an event pattern before deploying a rule?
Use the console's sandbox or the TestEventPattern API. Both take a pattern and a sample event and tell you whether it matches, with no rule or target needed.
aws events test-event-pattern \ --event-pattern file://pattern.json \ --event file://event.json
The sample event must include the full envelope (id, account, source, time, region, resources, detail-type and detail), otherwise the test will not behave like a real event.
For an end-to-end check, publish a sample to a dev bus with put-events and attach a temporary CloudWatch Logs target to the rule. Keep both the pattern and sample events in version control.
Take quiz
A rule ARN and a target ARN
A pattern and a sample event
An archive name and a replay window
Create a second archive
Enable schema discovery on a partner bus
Attach a temporary CloudWatch Logs target
43. How do you troubleshoot an EventBridge rule that is not triggering?
Work from the producer to the target and check each hop.
- Producer: was the event published to the right bus and Region? Check
FailedEntryCountfromPutEvents, and remember that custom sources cannot start withaws.. - Rule: is it enabled and attached to that bus?
- Pattern: test it against the real event. Common culprits are case, arrays, nested
detailpaths, and string versus number types. - Metrics:
MatchedEventswithoutInvocationsmeans the pattern worked but delivery did not. NoMatchedEventsmeans the pattern, bus or producer is wrong. - Permissions: the target resource policy or the rule's IAM role.
- DLQ and logs: read the DLQ error attributes and the target's own logs.
Adding a CloudWatch Logs target with the same pattern is the fastest way to see exactly what arrived.
Take quiz
The pattern never matched anything
The producer is publishing to the wrong Region
The pattern works but delivery to the target is failing
FailedEntryCount
Size of the Lambda deployment package
Time zone of the producer
44. Why should you use a custom event bus instead of the default bus?
The default bus carries AWS service events and is often already shared by many teams. A custom bus gives you a clean boundary for your own domain events.
- Isolation: one bus per domain or team keeps patterns simple and blast radius small.
- Access control: each bus has its own resource policy, so you can grant a partner account access to one bus only.
- Archive and replay: archives are per bus, so you replay one domain without touching others.
- Schema discovery: turn it on for a single bus rather than for mixed traffic.
- Clarity: your events are not mixed with CloudTrail and service events.
Scheduled rules still need the default bus, and rules for AWS service events usually live there too.
Take quiz
Each bus has its own resource policy
Custom buses ignore IAM
They disable cross-account sending
Cross-account delivery
Legacy scheduled rules
Event archives
45. How do you design event schemas for versioning in EventBridge?
Treat each event type as a public contract. Keep changes additive so existing consumers continue to work, and make consumers tolerant by ignoring fields they do not know.
- Use a clear
detail-typein the past tense, likeOrderPlaced. - Put a
schemaVersionfield indetail, for example"1.2". - Adding an optional field is a minor change. Renaming or removing a field is a breaking change.
- For breaking changes, publish a new type such as
OrderPlaced.v2and run both until consumers migrate. - Keep payloads small and send IDs plus the minimum data. Use the claim-check pattern for large payloads.
Use the Schema Registry to document each version and generate code bindings, and add contract tests so a producer change cannot silently break a consumer.
Take quiz
Changing a number to a string
Adding an optional field
Renaming an existing field
Delete the archive first
Overwrite the old schema in place
Publish a new event type or version and run both for a while
46. When would you choose Step Functions as an EventBridge target?
Choose it when handling the event takes several steps, needs branching, waits, retries or compensation. A single Lambda is enough for one short step, but it becomes awkward when it grows into a chain of calls.
| Use Lambda directly when | Use Step Functions when |
| One short, simple action | Multiple ordered steps |
| No long waits | Waiting for callbacks or human approval |
| Error handling is trivial | You need per-step retries and a saga with compensation |
| No need to see progress | You want a visual execution history |
A rule starts the state machine with the event as input. The state machine can then call services directly, so you often write less code than with a chain of Lambdas. Express workflows suit high-volume short jobs, and Standard workflows suit long-running ones.
Take quiz
Copying one small object
Writing one log line
A multi-step order fulfilment with compensation on failure
The matched event as the execution input
A copy of the entire bus
Only the rule name
47. What is the difference between choreography and orchestration in EventBridge?
In choreography, services react to events independently and nobody is in charge. In orchestration, one coordinator, usually Step Functions, tells each step what to do and tracks the overall result.
| Choreography | Orchestration |
| Services publish and subscribe via the bus | A workflow calls services in order |
| Loose coupling, easy to add consumers | Tighter coupling, clear control flow |
| Flow is implicit, harder to trace | Flow is explicit and visible |
| Failure handling is spread across services | Central retries and compensation |
A common rule of thumb is choreography between bounded contexts and orchestration inside one service's business process. Use correlation IDs in events so choreographed flows can still be traced.
Take quiz
Orchestration
Event archiving
Choreography
Inside a single multi-step transaction needing central rollback
Between independent services or bounded contexts
Only for scheduled jobs
48. How can you optimize EventBridge cost and performance?
Custom events are billed per million published, in 64 KB chunks, while AWS service events on the default bus are free. Most savings come from sending less and filtering earlier.
- Keep events small so each one stays within a single 64 KB billing chunk.
- Batch up to 10 entries per
PutEventscall and handle partial failures. - Write precise patterns so consumers get only what they need, and avoid duplicate rules.
- Archive only what you will replay, with a pattern and a retention period.
- Use Pipes filtering to avoid invoking expensive enrichment or targets.
- Use Scheduler instead of a Lambda that polls on a timer.
- Watch cross-account and cross-Region forwarding, since each hop is billed.
For performance, back off on throttling, request quota increases early, and keep targets fast or buffered behind SQS.
Take quiz
Per byte of event detail only
Per million events, in 64 KB chunks
A flat monthly fee per bus
Adding more targets to every rule
Turning on schema discovery everywhere
Writing more precise event patterns
49. How do you define an EventBridge rule in CloudFormation?
Use AWS::Events::Rule with the bus name, an EventPattern and a list of Targets. Remember a separate permission resource for Lambda targets.
OrderPaidRule: Type: AWS::Events::Rule Properties: EventBusName: !Ref OrdersBus EventPattern: source: ["com.shop.orders"] detail-type: ["OrderPaid"] Targets: - Id: ProcessOrder Arn: !GetAtt ProcessOrderFn.Arn RetryPolicy: MaximumRetryAttempts: 5 MaximumEventAgeInSeconds: 3600 DeadLetterConfig: Arn: !GetAtt OrdersDlq.Arn ProcessOrderPermission: Type: AWS::Lambda::Permission Properties: FunctionName: !Ref ProcessOrderFn Action: lambda:InvokeFunction Principal: events.amazonaws.com SourceArn: !GetAtt OrderPaidRule.Arn
In CDK the equivalent is events.Rule with targets.LambdaFunction, which creates the permission automatically. SAM offers an EventBridgeRule event source on a function.
Take quiz
AWS::EventBridge::Router
AWS::SNS::Rule
AWS::Events::Rule
An AWS::Lambda::Permission for events.amazonaws.com
A second event bus
A VPC endpoint
50. How would you design a resilient event-driven order system with EventBridge?
Publish domain events to a dedicated custom bus, give each consumer its own queue, and design for duplicates, failures and replay from day one.
flowchart LR O["Order service"] -->|PutEvents| B[orders-bus] B -->|rule| Q1["Payment queue"] B -->|rule| Q2["Inventory queue"] B -->|rule| Q3["Email queue"] Q1 --> L1["Payment Lambda"] Q2 --> L2["Inventory Lambda"] Q3 --> L3["Email Lambda"] Q1 -.-> D[DLQs] B -.-> AR[Archive]
- Producers retry
PutEventsand checkFailedEntryCount. For stronger guarantees, write the event and an outbox row in one DynamoDB transaction and publish from there. - One rule per consumer routes into an SQS queue for buffering and back-pressure, each with a DLQ and retry policy.
- Consumers are idempotent, using the order ID as the dedup key.
- Multi-step flows like payment and inventory reservation run as a Step Functions saga with compensations.
- An archive on the bus allows replay after a bug fix, scoped to the repaired rule.
- Global endpoints give regional failover when the business needs it.
- Alarms on
FailedInvocations, DLQ depth and consumer age make failures visible.
Events stay small and carry IDs, with a schemaVersion and a correlation ID so a single order can be traced across services.