Lesson 2 of 4 Amazon EventBridge and AWS Health

Delivering Events to Targets Reliably

This lesson covers EventBridge targets, input transformers, Pipes, cross-account delivery, archives and EventBridge Scheduler, which deliver events in a usable form with the right permissions and a plan for failures.

Learning outcomes

After completing this lesson, you will be able to:

  • Grant targets the permissions EventBridge needs.
  • Shape events with input transformers.
  • Handle delivery failures with retries, dead-letter queues and replay.
  • Centralise events across accounts and schedule tasks.

Targets and permissions

Targets include Lambda functions, SNS topics, SQS queues, Step Functions state machines, Systems Manager Automation and Run Command, ECS tasks, Kinesis and Firehose streams, CloudWatch log groups, API destinations (HTTPS endpoints with connection credentials) and event buses in the same or another account or Region. EventBridge needs permission to invoke each target. Lambda, SNS, SQS and CloudWatch Logs use resource-based policies that allow events.amazonaws.com; Step Functions, Systems Manager, ECS, Kinesis and cross-account buses use an IAM role that the rule assumes. The console adds these automatically; the CLI and infrastructure as code must add them explicitly.

Sort into groups

Resource policy or role?

Exam skills 1.2.2 · 4.1.1

Decide how EventBridge gets permission to invoke each target.

Log in to try this activity Interactive activities are free with an account.

Shaping and enriching events

By default the whole event is passed to the target. An input path passes one part, a constant passes fixed JSON, and an input transformer extracts values with JSONPath into variables and inserts them into a template, for example to build a readable SNS message or the parameter object an Automation runbook expects.

"InputTransformer": {
  "InputPathsMap": {"instance": "$.detail.instance-id", "state": "$.detail.state", "time": "$.time"},
  "InputTemplate": "\"Instance <instance> changed to <state> at <time>.\""
}

EventBridge Pipes connect a single source (such as an SQS queue, Kinesis stream or DynamoDB stream) to a target with optional filtering, an enrichment step (a Lambda function, Step Functions express workflow, API destination or API Gateway endpoint that adds data) and transformation, without writing glue code.

Delivery failures, archives and replay

If a target cannot be invoked, EventBridge retries with exponential backoff for up to 24 hours and 185 attempts by default; both limits can be lowered with a retry policy. Events that still fail are dropped unless the target has a dead-letter queue (an SQS queue), where they are kept with error details. An archive stores events from a bus, optionally filtered, for a chosen retention period, and replay sends archived events back to the bus, which is useful after fixing a broken consumer.

The following diagram shows the failure path and the archive and replay path.

What happens when EventBridge cannot invoke a target. It retries with exponential backoff for up to 24 hours and 185 attempts by default. Events that still fail are dropped unless the target has an SQS dead-letter queue. Separately, an archive keeps events from the bus, and replay sends them back after a broken consumer is fixed.
Lowering the retry limits makes failed events reach the dead-letter queue sooner.

24hours

Default retry period for a target that cannot be invoked

185attempts

Default maximum retry attempts

True or false

Retries, DLQs and replay

Exam skills 1.2.2

Check how EventBridge handles failed deliveries.

Log in to try this activity Interactive activities are free with an account.

Cross-account events and EventBridge Scheduler

To centralise events, a rule in each source account targets the event bus of a central account; the central bus policy allows the source accounts or the whole organisation (aws:PrincipalOrgID), and the source rule's role allows events:PutEvents. Rules in the central account then process events from all accounts. Buses can also forward events to another Region.

EventBridge Scheduler creates one-time or recurring schedules (cron, rate or a specific time with a time zone) that invoke over 270 services directly with universal targets, with flexible time windows, retries and dead-letter queues. It replaces scheduled rules for tasks such as stopping development instances every evening or starting a nightly Automation runbook. The following table summarises when to use each EventBridge feature.

NeedFeature
React to events from AWS servicesRule on the default bus
Run something at a time or intervalEventBridge Scheduler
Connect a queue or stream to a target with enrichmentEventBridge Pipes
Re-process past eventsArchive and replay
Collect events from many accountsCross-account target to a central bus
Scenario questions

Scheduling actions

Exam skills 1.2.2 · 3.2.2

Choose how to run actions on a schedule.

Log in to try this activity Interactive activities are free with an account.
Check yourself

What happens to an event when a target keeps failing and no DLQ is configured?

Show answer

It is dropped after the retry policy is exhausted.

Exam Tips

Remember for the exam

  • Lambda, SNS and SQS targets need resource-based policies; Step Functions and SSM targets need a rule role.
  • Input transformers build custom payloads from event fields.
  • Configure a DLQ on targets; otherwise events are dropped after retries.
  • Use archives and replay to reprocess events after a fix.
  • EventBridge Scheduler is the preferred way to run scheduled tasks.