Generated banner for Amazon Eventbridge Event Bus
Generated logo for Amazon Eventbridge Event Bus

Amazon Eventbridge Event Bus

AWSOfficialPublished by AWS

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • No issues found

From the author

Builds, runs, debugs, and operates event-driven applications using EventBridge Event Bus - a managed, centrally governed publish/subscribe event bus that an organization can share across many teams and accounts. Applicable when workloads need event-driven architectures, decoupling, choreography, asynchronous integration, pub/sub, fan-out, event ordering, delivered in sequence, event router, event broker, event bus, event store, event retention, event replay, deduplication, avro, protobuf, cloudevents, uses events or messages. Designed as a centrally managed event bus platform allowing governance and control - such as subscriber control, revocation, per-account throttling - while giving application owners flexibility across an organization spanning multiple accounts, with end-to-end open-standards observability and cost allocation. Also helps reduce costs in high fan-out scenarios where multi-account forwarding adds cost. A serverless, managed alternative to self-managed event streaming platforms.
— the description by AWS

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides comprehensive guidance for building, running, and debugging event-driven applications using the modern EventBridge custom event bus. It covers the lifecycle of event management, including publishing via PutEvents or PutRawEvents, configuring subscribers with filters and transformers, and managing cross-account event routing. The skill emphasizes the distinction between the new custom event bus service and classic EventBridge, providing specific instructions for handling binary payloads, CloudEvents, and complex routing requirements.

What it does

  • Guides the creation and management of custom event buses and subscribers.
  • Explains the differences between PutEvents and PutRawEvents APIs for payload handling.
  • Provides patterns for filtering, transforming, and routing events to various targets.
  • Details authorization and security policies for cross-account event sharing.
  • Offers troubleshooting steps for delivery failures, observability, and metrics.
  • Supports advanced features like event replay, deduplication, and FIFO ordering.

When to use it

  • When designing decoupled, asynchronous event-driven architectures.
  • When you need to implement fan-out patterns across multiple AWS accounts.
  • When you require a managed, serverless alternative to self-hosted event streaming.
  • When you need to integrate AWS service events or partner SaaS events into your workflow.
  • When you need to perform event transformation or filtering before delivery.

Advantages

  • Centrally governed publish/subscribe model for multi-team environments.
  • Native support for open standards like CloudEvents, Avro, and Protobuf.
  • Built-in durability with configurable event retention and replay capabilities.
  • Granular control over subscriber access and per-account throttling.
  • End-to-end observability with integrated metrics and delivery logging.

Usage examples

“Write a filter so this subscriber only gets orders over $500.”
The agent provides a JSON filter pattern scoped to the event data, ensuring only events matching the specified amount are routed to the target.
“My producer says PUBLISHED but nothing shows up in the queue. What do I check?”
The agent guides you through checking subscriber logs, verifying the target role permissions, and confirming the filter logic matches the published payload structure.
“Should I use PutEvents or PutRawEvents for Protobuf payloads?”
The agent explains that PutRawEvents is required for binary or non-JSON payloads, and provides instructions on setting the appropriate ContentType.
“Set up a subscriber that reprocesses everything from the last two days.”
The agent provides the steps to configure a replay on the event bus, specifying the retention window and the target subscriber.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/aws/amazon-eventbridge-event-bus/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip amazon-eventbridge-event-bus.zip -d .agents/skills

Documentation by AWS

Building with the new EventBridge custom event buses

Overview

The new EventBridge custom event bus routes events and retains them. You publish with one of two APIs, and subscribers filter, optionally transform, and deliver each matching event to one target.

Read chapters 5 and 6 before writing any filter, transformer, or target parameter. The two publish APIs deliver different payload shapes, and an expression written for one silently matches nothing against the other.

Publish metrics are on by default, so you can always tell whether events reached a bus. Subscriber logs are off by default, so turn them on before you debug a delivery rather than after (chapter 18).

Works best with the AWS MCP server, which is recommended for running the CLI calls in this skill: it executes them in a sandboxed environment with audit logging. All guidance also works with standard AWS CLI access.

Conventions

The key words MUST, MUST NOT, SHOULD, and MAY in this skill are to be interpreted as described in RFC 2119. They appear only in decision procedures, where following the wrong course either breaks the configuration or loses events silently. MUST marks an absolute requirement, SHOULD a strong recommendation you may have a specific reason to set aside, and MAY a genuine option.

Everything else is ordinary description. A sentence stating how the service behaves carries no keyword, because it is a fact rather than an instruction to you.

When not to use this skill

This skill is only about the new custom event buses, the service you reach with the eventsv2 CLI and the eventbridgev2 SDK clients. It does not cover:

  • Classic EventBridge, meaning the events API with rules, targets, archives, and event patterns on AWS::Events::Rule. The two services share the events: IAM namespace and some vocabulary, which is exactly why they are easy to confuse. If you are writing a rule, you are not on a new bus. Chapter 3 maps the concepts across if you are migrating.

  • EventBridge Pipes, Scheduler, and Schemas (the classic schema registry and its discovery feature). Different APIs.

  • Configuring the Firehose service itself, such as buffering hints or record transformation. A Firehose delivery stream is a valid subscriber target; chapter 9 covers that side of it.

Trigger examples

  1. "Write a filter so this subscriber only gets orders over $500."

  2. "My producer says PUBLISHED but nothing shows up in the queue. What do I check?"

  3. "Should I use PutEvents or PutRawEvents for Protobuf payloads?"

  4. "Set up a subscriber that reprocesses everything from the last two days."

  5. "Write a JSONata expression that pulls the customer id out of the event into a DynamoDB putItem."

Guardrail — where this skill's own files live (MCP vs local install)

This skill can be loaded two ways, and they resolve the skill's own bundled files from different places. Determine how the skill was loaded before reading a reference:

  • Loaded through the AWS MCP retrieve_skill tool: The skill is not installed on the local filesystem. You MUST fetch each reference via retrieve_skill with the file parameter (e.g. file="references/setup-walkthroughs.md"). Do NOT file_read these paths locally — they do not exist on disk.

  • Installed locally (e.g. .kiro/skills/amazon-eventbridge-event-bus/ or ~/.claude/skills/amazon-eventbridge-event-bus/): Read files from the local skill directory using relative paths.

This distinction applies only to the skill's own packaged files. User data and session artifacts are always read from and written to the user's working directory. Never fetch or write customer data through retrieve_skill.

Reference files

The chapters below carry the decisions and the failure modes; the detail lives in these files. Load a file when the task matches its row, and do not load them all by default.

FileWhen to load
setup-walkthroughs.mdstanding up a working bus end to end, in one account or shared across accounts with AWS RAM, including prerequisites and teardown
code-samples.mdwriting an individual CLI or SDK call (Python, Java, TypeScript): create a bus and subscriber, publish with either API, binary payloads, replay, cross-account grants, waiters, per-entry results, throttling backoff
filters-and-expressions.mdwriting any filter pattern, JSONata expression, or target parameter that reads the event; both delivered envelopes in full
target-configuration.mdconfiguring any subscriber target, especially a universal target
target-contract.mdwriting an actual CreateSubscriber call: required fields, a working example per target type, literal versus JSONata, the delivery error taxonomy
migrating-from-classic.mdmigrating from classic EventBridge, planning the migration sequence, or classic habits producing wrong new-bus config
event-sources.mdputting AWS service events or partner events on a bus with an event source, or forwarded events not arriving or not matching a filter
provisioning-and-state.mdcreating or updating a bus, or a resource stuck in an unexpected state
delivery-troubleshooting.mdan event published but never arrived, or building a test rig that counts deliveries correctly
authorization.mdwriting an IAM policy or bus resource policy, cross-account access checks, or anything that forwards events into a bus
replay-and-recovery.mdreading history rather than new events, pausing or resuming, or a replay that looks broken
observability.mdsetting up metrics, alarms, or the vended-log delivery; reading delivery logs; observing across accounts
schema-registries.mdpublishing Avro, Protobuf, or anything that is not JSON; the accepted content types; running alongside Kafka
cloudevents.mdpublishing or consuming CloudEvents, or filtering on CloudEvents attributes
security-and-sharing.mdencrypting a bus, sharing it cross-account, or tagging
cost-and-quotas.mdbilling mechanics, who pays what across accounts, shaping events for cost, or handling throttling
infrastructure-as-code.mdwriting a CloudFormation template, splitting stacks across accounts, or private connectivity

1. The three resources

Event bus. The thing you publish to. It routes events and retains them.

Subscriber. A statement of which events you want and where to send them, in one resource. It watches its bus, keeps the events matching its filter, optionally transforms each one, and delivers it to exactly one target. To send one event to several targets, create several subscribers on the same bus.

Event source. A managed feed into a bus, either AWS service events or a partner/SaaS source.

Names and identifiers:

  • A bus ARN and a subscriber ARN both end in a service-generated id after the name: arn:aws:events:us-east-1:111122223333:event-busv2/my-bus/exampleid0123456789abcdef. Store the full ARN, not the name, because the name alone does not identify the resource and re-creating a deleted bus with the same name yields a different id.

  • Event source names are unique per account, not per bus.

  • Three names identify this service and they do not match. The CLI command and the endpoint host are eventsv2, as in aws eventsv2 create-event-bus and eventsv2.{region}.amazonaws.com. The SDK clients are eventbridgev2. IAM actions and ARNs are events, shared with classic EventBridge, as in events:PutEvents and arn:aws:events:...:event-busv2/.... See chapter 14.

2. A router with a durable log behind it

The bus routes each event to matching subscribers, and it also retains events for a configured period, set per bus with StorageConfiguration.RetentionPeriodInDays (1 to 365 days). Retention is what makes four other features possible: starting positions, pausing and resuming, replay, and a subscriber created today reading events published yesterday. The retention window is clamped at the bus's creation time, so on a young bus even a recent past timestamp can fall outside it.

3. Coming from classic EventBridge

A classic rule plus its target becomes one subscriber on the new bus. Four new-bus concepts have no classic analogue: retention on the bus itself, a subscriber starting position, pause and resume with a backlog, and two publish APIs with different payload models. That last changes how you write filters, so a classic event pattern ported unchanged works only for PutEvents. The concept mapping, the habits that carry over incorrectly, and a step-by-step migration sequence are in migrating-from-classic.md.

4. AWS service and partner event sources

An event source is a managed feed onto your bus. You create one naming a destination bus and one origin, and the service stands up the forwarding on the classic EventBridge side for you. There is no role and no delivery code: the managed path uses the service's own identity.

Configuration is discriminated and exactly one variant MUST be set:

VariantOriginRequired member
AwsServiceEventsConfigurationone AWS service, as aws.s3AwsService
PartnerEventsConfigurationa classic partner event sourcePartnerEventSourceArn

Both take an optional Pattern, which narrows what forwards and is evaluated on the classic side against the classic envelope. Your pattern MUST NOT carry a source key or a top-level account or region, because the service sets those itself to pin the forward to your account and origin.

A forwarded event arrives as the whole classic envelope. Data holds it, ContentType is application/eventbridge+json, your content is at $events.Data.detail, and the source and detail-type are in SystemMetadata as aws:Source and aws:DetailType. So a classic rule's source filter does not transfer: the equivalent is a SYSTEM_METADATA filter, {"aws:Source":["aws.s3"]}.

Only that SystemMetadata pair proves an AWS service or partner produced the event. No publish call can write either key. A raw payload can imitate the envelope exactly, so a DATA filter on the payload's source matches a forgery as readily as the real thing. You SHOULD filter on aws:Source whenever provenance matters, and MUST match its value rather than its presence, because a direct PutEvents sets the key too, from its own never-aws.-prefixed Source.

EventBusArn is immutable. Recovery splits by failure: from CREATE_FAILED or UPDATE_FAILED, UpdateEventSource converges the classic side back to your record, while from DELETE_FAILED the only recovery is another delete.

A bus owner's control is at create time. CreateEventSource is authorized against the destination bus with an events:source condition key, and RevokeResource is how an owner stops a feed that already exists (chapter 22). Prerequisites, encryption, dead-lettering, and what appears in your classic account are in event-sources.md.

5. Choosing a publish API

The choice fixes the payload shape, and the payload shape determines every filter, transformer, and target parameter you go on to write.

PutEventsPutRawEvents
Payload fieldDetail, a JSON stringData, a base64 blob
Payload must be JSONYesNo, any format
Required per entrySource, DetailTypeData, SystemMetadata
ContentTypeNot accepted; the service stamps application/eventbridge+jsonRequired, inside each entry's SystemMetadata
Classic-style fieldsResources, Time availableNot present
Your own metadataNoMetadata, up to 100 keys
Ordering and dedup inputsSystemMetadata.EventGroupId, SystemMetadata.DeduplicationIdSame two fields

Use PutEvents for JSON events where you want the classic-shaped envelope. Use PutRawEvents for binary or non-JSON payloads, your own metadata keys, or a payload delivered exactly as sent.

Both return one result entry per request entry in the same order, so you correlate by index. Each carries either a SuccessCode or an ErrorCode and ErrorMessage. SuccessCode is PUBLISHED or DEDUPLICATED, and DEDUPLICATED is a success, not an error. Code that treats every success as a new event makes deduplication look like delivery.

Publishing Avro or Protobuf requires a schema registry named on each publish request, not on the bus; a registry configured in the wrong place leaves your events undecoded. application/octet-stream needs no registry, because the service does not decode those bytes at all (schema-registries.md).

6. Addressing: where every field lives

Filters, transformers, and target parameters share one addressing model, and it is not the same for the two publish APIs. Every event is delivered under three top-level names: Data (the payload), Metadata (your own keys, PutRawEvents only), and SystemMetadata (service-assigned and ordering fields). A raw-published payload sits directly in Data; a PutEvents payload sits inside the classic envelope, one level down under detail. So the same field is $events.Data.m for one API and $events.Data.detail.m for the other, and the wrong form does not error: it resolves to nothing, the filter matches nothing, and the transformer emits nothing. If you publish through both APIs onto one bus, write expressions that work for both, or give each traffic type its own subscribers; no addressing form spans both. Both envelopes in full, with every SystemMetadata field, are in filters-and-expressions.md.

7. Filtering

A subscriber's FilterConfiguration holds a list of Filters, and an event must match every filter in the list to be delivered: the filters are ANDed, not ORed. Each filter has a Pattern and a Scope (DATA, METADATA, or SYSTEM_METADATA), one filter per scope. A DATA pattern is written against the chapter 6 shape, so one pattern cannot serve both publish APIs; each is correct for exactly one API and silently matches nothing for the other. FilterConfiguration is optional on create, and a subscriber without one receives every event on the bus. A filter that matches nothing is indistinguishable from a broken subscriber, so confirm a should-match and a should-not-match case by observing the target.

8. Transformation

A subscriber's Transformer has three types: RAW (the default) delivers the payload alone, WITH_METADATA delivers the three-part envelope, and JSONATA delivers the result of an expression. A JSONata expression is wrapped in {% %} delimiters and sees the event as $events, addressed exactly as in chapter 6. Most scalar target parameters also accept an expression in the same form. Some members refuse one and MUST be literals: an API Gateway header name, a message attribute's BinaryValue, and InvocationType. An expression is only syntax-checked at create, so its result is a delivery-time fact. A JSONATA transformer whose expression throws, or evaluates to nothing, is a customer-fault delivery failure, so you SHOULD test it.

9. Targets and their parameter blocks

InvokeConfiguration carries the TargetArn, the RoleArn, and at most one parameter block, matching the target. A universal target MUST carry its block; every typed block may be omitted. A classic bus and a Firehose delivery stream are both valid targets that take no block at all.

The service resolves the target type from the ARN and checks the invariants it owns before storing anything: that the block matches the target, that the ARN's region, partition and account are its own, and that every expression parses. It does not mirror the target API's own parameter grammars, value ranges, identifier limits, or which members that API requires — those stay with the target, so a request the target will reject is accepted at create and fails at delivery.

  1. You MUST supply the parameter block a universal target requires. A typed block may be omitted: KinesisParameters: {} is stored, and Kinesis reports the missing PartitionKey when it is called.

  2. You MUST NOT put a constant in a per-message field, because a constant deduplication id makes the target discard everything after the first message. Neither form is checked against the target's range, requiredness or FIFO applicability, so a bad or missing value is a delivery failure.

  3. You SHOULD check the target service's own rules. Existence, reachability, authorization, size after enveloping, and its API's required fields are enforced by the target, at delivery.

  4. You SHOULD confirm at the target, because a PUBLISHED response is not delivery, and neither is an HTTP 200 from a batch API, which can carry individually failed entries.

  5. You MUST attach a dead-letter queue and turn on logs before you test, and MUST grant the delivery role sqs:SendMessage on that queue, because a failure otherwise leaves no signal anywhere.

Each rule's failure mode, the exact rejection messages, and the per-target blocks are in target-configuration.md. Before writing the call itself, load target-contract.md for the required-field lists, one working example per target type, and the delivery error taxonomy.

10. Universal targets

A universal target invokes any supported AWS API directly, with no intermediate function. The target ARN has a fixed shape:

arn:{partition}:events:::aws-sdk:{service}:{apiAction}

Four things to get right, each of which fails at create time with a message that names the problem: apiAction is camelCase with a lowercase first letter (putItem); service is the SDK service id, which is not always the obvious word (Step Functions is sfn); UniversalTargetParameters.Input is required and holds the API request as JSON or a JSONata expression producing it; and BatchConfiguration is required. The service's validation text abbreviates universal target as "USI target"; the two mean the same thing.

11. Ordering and deduplication

Ordering is a subscriber property. Type is UNORDERED (no guarantee) or FIFO (ordered within an event group), and events are grouped by SystemMetadata.EventGroupId at publish time. A FIFO target enforces its own length and character limits on the group id, and an undeliverable event holds up the later events in its own group while other groups on the same subscriber keep flowing, so keep group ids bounded and do not derive them from unbounded input.

Deduplication happens at publish time, two ways. DeduplicationConfiguration.DeduplicationType: CONTENT_BASED on the request hashes the event content, and CONTENT_BASED is the only DeduplicationType value. To deduplicate on your own key instead, omit DeduplicationConfiguration and set SystemMetadata.DeduplicationId on each entry. A suppressed duplicate returns SuccessCode: DEDUPLICATED either way.

Keep the two ideas separate. Bus-level deduplication decides whether an event is accepted. A FIFO target's own deduplication id, set in the target parameter block, decides whether that target accepts the delivery. Different fields at different layers, and the second is a per-message value (chapter 9, rule 2).

12. Retries and dead-lettering

RetryPolicy has three members:

MemberRangeDefault
MaxRetryAttempts0-1855
MaxEventAgeInSeconds60-86400300
RetryStrategyALLALL

Delivery stops at whichever limit is reached first, and a failing delivery is retried until then. So a conclusion that "nothing arrived" is only safe after the MaxEventAgeInSeconds window has elapsed.

OnFailureConfiguration.Arn names an SQS queue for dead-lettering, and SQS is the only supported destination. An event source refuses a FIFO queue there, with the single message OnFailureConfiguration.Arn must name a standard SQS queue: FIFO queues are not supported as EventSource dead-letter queues; a subscriber accepts one, so the two resources differ on this point. Two further limits to plan around: a dead-letter record identifies failed events by id and timestamp and does not carry the payload, so replaying it needs the event still inside retention; and the dead-letter queue must be writable by the delivery role, or the failure has nowhere to go and the events disappear with no signal.

13. Delivery permissions

InvokeConfiguration.RoleArn is the role the service assumes to invoke your target. It MUST belong to the calling account, its trust policy MUST allow the events.amazonaws.com service principal, and that policy SHOULD condition on aws:SourceAccount and aws:SourceArn. It MUST carry the action the target requires (sqs:SendMessage, sns:Publish, lambda:InvokeFunction, kinesis:PutRecords, states:StartExecution, or whatever your universal target calls), and sqs:SendMessage on your dead-letter queue, or deliveries fail, no failure record is written, and nothing is observable.

CreateSubscriber also enforces iam:PassRole on that role, so a role you cannot pass fails with AccessDeniedException before target validation runs. The list understates four: Kinesis delivery calls PutRecords, Firehose PutRecordBatch, API Gateway needs execute-api:Invoke, an API destination events:InvokeApiDestination.

The target ARN is checked at create for shape, type, region, partition and account, but not for existence or reachability: a well-formed ARN naming nothing is stored and fails at delivery.

14. Authorization: what your caller needs

Chapter 13 covers the role EventBridge assumes to invoke your target. This chapter covers what your caller needs to reach the API.

Every action name is events:. The CLI command and the endpoint host are eventsv2, and the SDK clients are named eventbridgev2, but the IAM namespace is events, shared with classic EventBridge. You MUST NOT write eventbridgev2: or eventsv2: in an IAM policy, because neither names an action that exists, and both fail closed: the policy is accepted and grants nothing. A policy written from the command you just ran, granting eventsv2:PutEvents, is the usual way this happens. The name-by-name map is in authorization.md.

Publishing is authorized against the bus ARN, per entry, with no partial authorization: if one entry fails a condition check the whole request is denied, so a batch is only as authorized as its least authorized entry.

Creating a subscriber or an event source is authorized against the bus, which makes the bus the cross-account grant point: a bus owner decides there whether another account may attach anything.

Forwarding into a bus under a role you supply is authorized at ingestion, per event: a genuine AWS or partner event needs events:PutEvents, and anything you originated needs events:PutRawEvents. So a forwarder carrying both kinds MUST be granted both actions, because granting one silently denies half the stream. The condition keys, the per-create checks, and revocation semantics are in authorization.md.

15. Provisioning and resource state

Creating a bus is asynchronous: CreateEventBus returns with State: CREATING, and the bus becomes usable later. Use the waiter rather than a hand-rolled poll, because it fails fast on the failure states and surfaces StateReason instead of spinning to a timeout:

aws eventsv2 wait event-bus-active  --event-bus-arn "$BUS_ARN"

A bus has seven states, and the asymmetry that matters is between the two failure states: UPDATE_FAILED is recoverable in place, and CREATE_FAILED is not. A failed create permits only delete, so that bus must be deleted and recreated. Delete subscribers and event sources before the bus; a bus that still has either rejects DeleteEventBus with ResourceInUseException, and the message names which kind is blocking. Revoked subscribers and event sources do not block the delete.

Creates are idempotent through ClientToken. CreateEventBus, CreateSubscriber, and CreateEventSource each accept one, and a retry carrying the same token returns the original result rather than creating a second resource. An SDK generates a fresh token per call when you omit the field, so a retry your own code issues builds a new request, gets a new token, and creates a second resource. So you MUST supply your own ClientToken whenever a retry can cross a process, a queue, or a workflow step. The mismatch error and the naming collision are in provisioning-and-state.md.

16. Updating safely

One rule governs every update API, and getting it wrong silently discards configuration you did not intend to change:

An omitted top-level member means unchanged. A supplied configuration block replaces that whole block.

So an update that supplies Configuration or FilterConfiguration or LogConfiguration in order to change one field inside it clears every other field in that block. An event source updated with its Pattern omitted comes back with no pattern at all, widening its filter to everything, with no warning. So you MUST read the resource, modify the whole block, write the whole block back, and then read it back again, because reading it back is the only way to confirm what was stored.

17. Pausing, resuming, and replay

There is no separate replay API. Replay is a subscriber's starting position, evaluated against the bus's retained events, so anything still inside retention can be reread.

  • StartingPosition at create time is LATEST (only events published after the subscriber exists) or POINT_IN_TIME (from a point in retained history).

  • Pausing is State: STOPPED on UpdateSubscriber. The backlog accrues, bounded by retention, and ResumePosition decides whether the backlog is delivered or skipped on resume.

  • Replayed events are marked. SystemMetadata."aws:DeliveryType" reads REPLAY instead of LIVE, so a consumer can make replay idempotent.

  • A replay has a startup delay, then runs at live speed, so allow for the delay before concluding a replay is broken.

18. Observability: metrics and logs

Two surfaces tell you what the service is doing, and their defaults are opposite.

Publish metrics are on by default, in the AWS/EventsV2 namespace, on the tuple {EventBus} plus {EventBus, EventSource} for traffic attributed to an event source and {EventBus, PublisherAccount} for ingress bytes. PublishEventsApproximateCallCount against PublishEventsApproximateSuccessCallCount is the cheapest check that your producer is reaching the bus at all. The outcome metrics count calls, not events, so a call that returned a response counts as a success even when every entry in it was rejected; PublishEventsEntryCount against PublishEventsFailedEntriesCount is what says whether events landed. The EventBus dimension value is not the bus ARN; querying with the ARN returns no data and looks identical to no traffic.

Subscriber logs are off by default, and they need two things before they exist: LogConfiguration.Level raised above OFF, and a CloudWatch Logs vended-log delivery wiring the subscriber to a log group. Set both up before debugging a delivery, not after. The delivery setup, the metric list, and the EVENT_DELIVERY_ATTEMPT record fields are in observability.md.

19. Verifying delivery

A publish response tells you the service accepted the event. It says nothing about delivery. To know an event arrived, look at the target.

A healthy delivery reaches the target quickly, so an event that has not arrived promptly is probably failing rather than in flight. But "nothing arrived" is only sound after the retry window elapses, because until then a failing delivery is still being retried.

Two counting mistakes make a working setup look broken. Reading an SQS queue without deleting the messages re-reads them, so raw counts overstate deliveries. And a shared target accumulates messages from earlier runs, so use a fresh target per experiment or a marker unique to the run.

20. When it published but never arrived

Nearly every delivery problem presents identically: the publish succeeded and the target is empty. You SHOULD work the ordered procedure in delivery-troubleshooting.md; it covers eleven causes ordered by how often each is the answer.

Three shortcuts that do not require opening the file:

  • You SHOULD check PublishEventsEntryCount first (chapter 18). Zero means the problem is upstream of the bus and nothing downstream matters yet.

  • You SHOULD turn on subscriber logs. INFO with IncludePayload: FULL shows the per-attempt error and the exact target_input sent, without waiting for retries to exhaust.

  • To see the event as the service sees it, you MAY add a second subscriber with Transformer: { Type: WITH_METADATA } and no filter, pointed at a queue you own.

21. Errors and client retries

Batch responses are per entry. A publish can return success at the request level with individual entries failed, so check FailedEntryCount and every entry, not just the HTTP status.

Some malformed input fails the whole request instead of one entry. Anything caught while deserializing the request rejects the entire batch and takes the valid entries with it. Validate per entry client-side, and keep batches small enough that losing one is cheap.

Retryable errors. ConcurrentModificationException and ThrottlingException are retryable with backoff. InvalidInputException, AccessDeniedException, ResourceNotFoundException, and IdempotentParameterMismatchException are not; fix the request.

Treat a persistent 500 as a client-side wire-type problem first. The usual cause is a value sent as the wrong JSON type, such as a number where a string is expected or an ISO-8601 string where epoch seconds are. An SDK retries a 500 by contract, and retrying cannot fix a malformed request, so check your types before escalating.

22. Security, encryption, sharing, tagging

  • Encryption is EncryptionConfiguration.KmsKeyIdentifier on the bus. Your caller needs kms:DescribeKey on the key at create time, and on a CMK bus every publisher needs kms:Decrypt on that key too, because a caller who cannot read the bus's events back is not allowed to write them. An unusable key policy on the service's side settles the bus at CREATE_FAILED with StateReason: KMS_ACCESS_DENIED instead (security-and-sharing.md).

  • To share a bus with another account, use AWS RAM. Resource policies are the fallback for what RAM cannot express, and a hand-written policy is invisible to RAM, so you then own tracking it.

  • Some operations are restricted to the bus owner, including revoking a shared resource, so a permission grant alone is not always sufficient. Revocation is terminal and scoped to the one resource you name, so stopping an account rather than a resource means also denying it events:CreateSubscriber and events:CreateEventSource in the bus resource policy (authorization.md).

23. Cost, quotas, and platform integration

Four things that change design decisions. Current prices and quota values are on the EventBridge pricing page and in Service Quotas, not here.

  • Billing rounds up per KB on both ingestion and delivery, so many tiny events cost more than the byte total suggests; batching related facts into one event is cheaper.

  • "Enriched operations" are billed separately: JSONata evaluation, schema deserialization, and CONTENT_BASED deduplication. So prefer a per-entry DeduplicationId, with no DeduplicationConfiguration, when you already have an idempotency key.

  • Publishing is throttled per account across both publish APIs, so a service splitting traffic between them draws from one budget. Subscriber management has its own per-account limit, so CreateSubscriber and DeleteSubscriber can be throttled while publishing has headroom. Handle ThrottlingException with backoff (chapter 21).

  • CloudFormation covers the new buses under AWS::EventsV2::, with three types. Six subscriber properties are create-only and replacement is delete-then-create, so changing a target ARN in a template can silently drop events published during the gap.

Files

references/delivery-troubleshooting.md

Delivery troubleshooting: published but never arrived

Nearly every delivery problem presents identically. The publish call returned success and the target is empty. This file is the ordered procedure for finding out why.

You SHOULD work down the list in order. It is ordered by how often each cause turns out to be the answer, so stopping early is normal.

If the failure is a rejected CreateSubscriber rather than a missing delivery, you are in the wrong file. The message names the member, and target-contract.md §1 to §3 explains which layer rejected it and why. Come here only once the subscriber exists.


0. Before you start: two facts that invalidate most conclusions

A publish response does not mean delivery. SuccessCode: PUBLISHED means the service accepted and stored the event. Delivery happens afterwards and can fail with no effect on that response.

SuccessCode: DEDUPLICATED is also a success. The event was accepted and suppressed as a duplicate. If your test harness treats every success as a new event, deduplication looks exactly like a delivery failure.


1. Did you wait long enough?

The single most common false alarm.

SituationMinimum wait before concluding "nothing arrived"
Live delivery, default retry policythe full default retry window (MaxEventAgeInSeconds)
Live delivery, custom MaxEventAgeInSecondsmore than that value
Replay (POINT_IN_TIME subscriber)the replay startup delay, before you even expect the first event

A healthy delivery reaches the target quickly, so an event that has not arrived promptly is probably failing rather than in flight. That does not make a negative conclusion safe yet: the retry policy keeps retrying a failing delivery until MaxRetryAttempts or MaxEventAgeInSeconds is exhausted. So you SHOULD use the fast-delivery expectation to decide something is wrong, and the table above to decide nothing is coming.

There is no exception for a permanent fault. An input-evaluation failure, a local conversion failure, and a 4xx from the target are each retried on the same budget as a 5xx, so none of them produces a dead-letter record any sooner. Retrying cannot fix them, so the whole window is spent for nothing. Set MaxRetryAttempts: 0 while you are diagnosing and the record arrives as soon as the first attempt fails. The one class that behaves differently is a service fault, which retries indefinitely and never dead-letters at all.

Two delays are not delivery latency and are often mistaken for it. A newly created subscriber needs a short activation delay before it reliably picks up events, which is a one-time cost per subscriber, not per event. And a replaying subscriber has its own startup delay before its first event, after which it runs at live speed.


2. Did the publish actually reach the bus?

A quick check that splits the problem in half, and it needs nothing configured in advance.

Metrics land in the AWS/EventsV2 namespace, on the tuple {EventBus}. The dimension value is the bus name and the generated id from its ARN, joined by a slash, and not the ARN itself:

aws cloudwatch get-metric-statistics --namespace AWS/EventsV2 \
  --metric-name PublishEventsEntryCount \
  --dimensions Name=EventBus,Value=my-bus/exampleid0123456789abcdef \
  --start-time <t0> --end-time <t1> --period 300 --statistics Sum

Passing the full ARN returns no datapoints, which looks exactly like no traffic. You SHOULD check the dimension value before you believe an empty result.

Read three metrics together:

MetricIf it is zero
PublishEventsEntryCountyour producer never reached this bus. Stop here; the problem is upstream, in the endpoint, credentials, or bus ARN
PublishEventsApproximateSuccessCallCountevery call either threw or was throttled. PublishEventsApproximateThrottledCallCount against PublishEventsApproximateFailedCallCount says which
PublishEventsFailedEntriesCountnon-zero means entries were rejected individually, inside calls your client may have treated as successful

A non-zero PublishEventsFailedEntriesCount SHOULD be checked even when everything else looks healthy, because a caller that only inspects the HTTP status will not have noticed those rejections. The outcome metrics count calls rather than events, so a call that returned a response counts as a success even when every entry in it was rejected: PublishEventsFailedEntriesCount equal to PublishEventsEntryCount is that case.

If entries were accepted, the publish side is fine and the fault is in routing or delivery. Continue.


3. Is the subscriber running, and has it been revoked?

One DescribeSubscriber call answers both, and they are different failures.

DescribeSubscriber { "SubscriberArn": "..." }

Check State:

  • RUNNING: continue to the revocation check below, then to step 4.

  • STOPPED: the subscriber is accruing a backlog, not failing. Resume it with UpdateSubscriber { State: RUNNING }. ResumePosition: LAST_PROCESSED (the default) delivers the backlog; LATEST discards it.

  • CREATING: not ready yet. A subscriber created and published to immediately can miss the first event. You SHOULD allow a short delay before publishing.

  • CREATE_FAILED: read StateReason. It names the cause.

Then check Revoked. This is the answer whenever a working subscriber stops receiving events suddenly and nothing about your own configuration changed.

The bus owner can revoke any subscriber attached to their bus. A revoked subscriber stops delivering regardless of its State, so State: RUNNING with Revoked: true is a subscriber that looks healthy and delivers nothing. Anything checking only State will call it fine.

The field is present only when true, so an absent Revoked means not revoked.

Revocation is terminal. No operation clears it, and mutating the subscriber now fails with InvalidStateException. Deleting it still works. So the remedy is not on your side: talk to the bus owner, and if they agree, create a new subscriber. You SHOULD NOT spend time re-checking filters, permissions, or expressions, because none of them are the cause.

The same applies to an event source that stops delivering into a bus. Call DescribeEventSource and check its Revoked field, which behaves identically.


4. Is the starting position what you think it is?

This cause has no error message, which is why it survives a search of the logs.

A subscriber created with StartingPosition: LATEST, which is the value you get by saying nothing, never sees an event published before the subscriber existed. If your test publishes first and subscribes second, LATEST correctly delivers nothing.

On a bus holding 5 events all published before any subscriber existed, each starting position delivers:

SubscriberDelivers
LATESTnone
POINT_IN_TIME / HORIZONall 5, once each
POINT_IN_TIME / TIMESTAMP at a midpointonly those after the midpoint

Fix: either publish after the subscriber is RUNNING, or create the subscriber with POINT_IN_TIME / HORIZON.


5. Does the filter actually match?

You SHOULD narrow it down by simplifying rather than deleting. Start from the broadest pattern that should still match your test event, confirm events flow, then add your conditions back one at a time until they stop. The condition you added last is the cause, and it is almost always an addressing mistake rather than a pattern mistake.

For an event {"orderId":"123","region":"eu"} published with PutEvents, that sequence looks like:

{"detail":{"orderId":[{"exists":true}]}}      does the field resolve at all?
{"detail":{"orderId":["123"]}}                does the value match?
{"detail":{"orderId":["123"],"region":["eu"]}} does the full condition match?

If the first step already matches nothing, the problem is the addressing rather than any value, so go straight to the four checks below. You MAY work on a copy of the subscriber if you would rather not change the live one: create a second subscriber with the simplified filter, pointed at a queue you own, and leave the original alone.

You SHOULD check these four in order:

  1. Which API published the traffic? The asymmetry is the same for patterns as for expressions:

    PutRawEventsPutEvents
    JSONata$events.Data.myfield$events.Data.detail.myfield
    DATA pattern{"myfield":["v"]}{"detail":{"myfield":["v"]}}

    A pattern or expression written for the wrong API does not error. It matches nothing.

  2. Are you filtering on aws:Source or aws:DetailType? Those fields exist only on PutEvents events. A SYSTEM_METADATA filter on aws:Source never matches raw-published traffic, because the field is absent, not empty.

  3. Are you filtering on ContentType? PutEvents events carry application/eventbridge+json, not application/json. A filter for application/json will not match them.

  4. Do you have more than one filter? All filters must match. They are ANDed. Two filters that are each individually correct can still combine to match nothing.


6. Read the failure: subscriber logs, then the dead-letter record

Two surfaces name the cause. Logs are faster, because a dead-letter record only appears after retries are exhausted, which takes the full retry window.

Subscriber logs are off by default. LogConfiguration.Level defaults to OFF, so a subscriber you did not configure for logging has emitted nothing. Turn it on:

UpdateSubscriber {
  "SubscriberArn": "...",
  "LogConfiguration": { "Level": "INFO", "IncludePayload": "FULL" }
}

INFO records every attempt including successes, which is what you want while diagnosing. ERROR records failures only. The Create and Update responses do not echo the field, so you SHOULD confirm with DescribeSubscriber. Records reach a destination through a CloudWatch Logs delivery, so you MUST create one for the subscriber if you have not, because raising Level with no delivery configured produces nothing readable. The three-call delivery setup is in observability.md.

Then reproduce and read the EVENT_DELIVERY_ATTEMPT records. The fields that answer this question fastest:

FieldTells you
details.outcomeSUCCESS or FAILURE, per event per attempt
error.error_code, error.error_messagethe cause, in the target service's own words
details.target_inputwhat was actually sent to the target, which settles any transformer or parameter question
details.http_status, details.target_request_idthe target's own response, for correlating inside the target service
details.attempt_countwhether retries are happening at all

Two readings settle where the failure happened:

  • No records at all means the event never reached the subscriber, so the fault is upstream of delivery: go back to steps 4 and 5.

  • An empty details.target_request_id on a failed attempt means the call never left this service. That is an input-evaluation or local SDK conversion failure, so the expression or the resolved request is wrong rather than the target.

Read details.target_input when an expression is suspected, because it shows what the target received rather than what you meant to send.

The dead-letter record is the other surface. If a dead-letter queue is configured, read it; the record names the cause and you are done.

If no dead-letter queue is configured, you SHOULD configure one and reproduce, because with neither logs nor a dead-letter queue a delivery failure leaves no readable trace anywhere.

UpdateSubscriber {
  "SubscriberArn": "...",
  "OnFailureConfiguration": { "Arn": "arn:aws:sqs:...:my-dlq" }
}

The ARN's shape is checked, so a malformed value is rejected outright. Then you SHOULD read the subscriber back and confirm OnFailureConfiguration is populated: other nestings of that field are accepted and stored empty, so a read-back is the only confirmation that a dead-letter queue exists.

Record shape, from a real access-denied failure:

{
 "version": "1.0",
 "busArn": "arn:aws:events:us-east-1:111122223333:event-busv2/my-bus/...",
 "subscriberArn": "arn:aws:events:us-east-1:111122223333:subscriber/my-sub/...",
 "targetArn": "arn:aws:sqs:us-east-1:111122223333:my-queue",
 "errorCode": "ACCESS_DENIED",
 "errorMessage": "User: ... is not authorized to perform: sqs:sendmessage on resource: ...",
 "exhaustedRetryCondition": "MaximumRetryAttempts",
 "retryAttempts": 5,
 "failedMessages": [
  { "eventId": "...", "eventGroupId": "g9", "deduplicationId": "order-1234",
    "timestamp": "2026-09-07T01:43:53.768Z", "targetRequestId": "..." }
 ]
}

How to read it:

FieldUse
errorCodethe class of failure, for example ACCESS_DENIED, CUSTOMER_VALIDATION. CUSTOMER_VALIDATION collapses every customer fault, so it does not by itself say which
errorMessagethe target service's own message, usually the exact answer. Truncated at 1024 characters
exhaustedRetryConditionMaximumRetryAttempts or MaximumEventAgeInSeconds, tells you which limit ended it
retryAttemptshow many retries happened. 0 means the retry budget was zero, or the age limit ended it at the first attempt — not that the fault was permanent, since permanent faults are retried too
failedMessages[].eventIdwhich events failed, for correlating against the publish response and the log record
failedMessages[].targetRequestIdthe target's own request id. Empty when the call never left this service

Three limits. failedMessages does not carry the payload, so the record alone is not enough to reconstruct the event; you need the event still inside the retention window. deduplicationId is present whenever the event carried one, including for an UNORDERED subscriber, so its presence tells you nothing about the subscriber's Type. And treat the errorCode set as open: match on the string rather than an enum.

Once you have error_code and error_message, classify the failure. target-contract.md §5 has the full table: which classes are permanent, which are retried, and which entries a partially failed batch retries. Every class is retried on the same budget, so the class tells you whether retrying can help, not whether a retry happens.


7. Can the delivery role write both the target and the dead-letter queue?

The role in InvokeConfiguration.RoleArn MUST have the target's own action and sqs:SendMessage on the dead-letter queue.

Granting the target but not the dead-letter queue means deliveries fail, the failure record cannot be written, and nothing is observable anywhere. A denied dead-letter queue produces total silent loss.

You SHOULD check with the target's action for your target type: sqs:SendMessage, sns:Publish, lambda:InvokeFunction, kinesis:PutRecord, states:StartExecution, or the API your universal target calls.

Corrections to that list. Kinesis delivery calls PutRecords, so the action is kinesis:PutRecords, and Firehose calls PutRecordBatch, so its action is firehose:PutRecordBatch. An API Gateway target needs execute-api:Invoke, an API destination needs events:InvokeApiDestination, and another new custom bus needs events:PutEvents and events:PutRawEvents. Full table in target-configuration.md.

Create checked the ARN's shape, target type, region, partition and account, so a wrong-region, wrong-partition, cross-account or wrong-shape target was rejected outright and never reached this point. Create did not check existence or reachability, so a well-formed ARN naming a target that does not exist is the case that arrives here and fails at delivery.


8. Does the target service accept what you are sending?

The target enforces its own rules at delivery time, and for most targets this service cannot tell you about them at create time.

  • Size. The binding limit is the target's, after enveloping, not the publish limit. Through SNS a payload around 200 KB is delivered, while payloads at 250 KB and above are accepted by the publish call and never arrive, because SNS caps the enveloped message at 256 KB.

  • Value ranges. The target owns these, and the service does not keep a copy, so neither a literal nor an expression is range-checked at create. A DelaySeconds of 999999 and of {% 999999 %} are both stored and both rejected by SQS with a 400 InvalidParameterValue. A create call that succeeded says nothing about the value.

  • Required and applicable members. The target also owns whether a member had to be there and whether it applies to the resource you named. An absent MessageGroupId on a .fifo queue or topic, a MessageDeduplicationId on a standard queue, a per-message DelaySeconds on a FIFO queue, and a message attribute with no DataType, and an UNORDERED subscriber targeting a FIFO queue are each accepted at create. The target decides whether delivery succeeds.

  • Name and identifier formats. Execution names, message group ids, and deduplication ids are checked by the target for character set, emptiness, and length, so a blank or too-long group id surfaces as a delivery failure rather than a create-time rejection.

  • Batch APIs can fail per entry inside an HTTP 200. SQS, SNS, and Kinesis deliveries use SendMessageBatch, PublishBatch, and PutRecords. A 200 carrying a failed-entry list retries only those entries, so a partly failing batch shows as neither a clean success nor a clean failure.

  • Required fields. For universal targets, the target API's required fields are checked at create time and the message names them, for example UniversalTargetParameters.Input is missing required field(s): Item, TableName.


9. Is a per-message field pinned to a constant?

A deduplication id is per-message by nature. A constant value is accepted at create time and is almost never correct: the target treats every message after the first as a duplicate of the first and discards it. The symptom is exactly one message arriving and then nothing.

Same reasoning applies to any field the target uses for identity or ordering, including a Step Functions execution Name, which MUST be unique per account, region, and state machine. You SHOULD derive them with a JSONata expression rather than a literal.


10. Did a transformer or target parameter resolve to nothing?

An expression that resolves to nothing produces an empty value, not an error. The delivery then either carries an empty field or is rejected by the target for an empty required field.

Diagnostic: create a second subscriber with Transformer: { Type: WITH_METADATA } and no filter, pointed at a queue you own. That delivers the event exactly as the service sees it, three-part envelope and all, which tells you the true addressing for your traffic and settles any expression question.

Worked example of this failure. A universal target writing DynamoDB with {% { "TableName": "t", "Item": { "pk": { "S": $events.Data.m } } } %} against PutEvents traffic fails with a dead-letter record reading:

errorCode: CUSTOMER_VALIDATION
errorMessage: Supplied AttributeValue is empty, must contain exactly one of the supported datatypes

The expression should be $events.Data.detail.m. The target and the permissions are not at fault.

A related failure has a different message and the same cause: an expression that throws rather than resolving to nothing, for example $number() applied to a non-numeric field. That fails inside the invoker before any target call, so the dead-letter record carries no targetRequestId.


11. Is one bad event blocking a group?

With the subscriber's Type: FIFO, events are ordered within an EventGroupId. An undeliverable event can hold up others in its group.

Test by publishing with a distinct SystemMetadata.EventGroupId. If the new group flows and the old one does not, you have a stuck group, not a broken subscriber.


Building a test rig that does not lie to you

Two measurement mistakes produce wrong counts.

Reading an SQS queue without deleting the messages re-reads them. A receive with --visibility-timeout 0 returns the same messages on the next call, so raw counts overstate deliveries. You SHOULD either consume as you read (receive, then delete by receipt handle), or deduplicate on a marker you put in the payload.

A shared target accumulates messages from earlier runs. You SHOULD use a fresh target per experiment, or a marker unique to the run.

Reliable sequence:

  1. Create the bus and wait with aws eventsv2 wait event-bus-active.

  2. Create the subscriber with OnFailureConfiguration and LogConfiguration.Level: INFO set from the start, so a failure is readable without a second attempt. Then allow a short delay before publishing.

  3. Publish with a unique marker inside the payload, and make the subscriber's filter match that marker, so a shared bus delivers only this run's events.

  4. Read the target. Live delivery is fast, so a poll loop with a short interval and a generous overall timeout tells you more than one long sleep.

  5. Consume the target and match on the marker.

Two refinements belong in the rig. You SHOULD publish repeatedly rather than once, on a short interval, while polling: a subscriber's routing takes a moment to converge after activation, so a single up-front publish can be missed by a subscriber that is otherwise correct. And you SHOULD set MaxRetryAttempts: 0 when testing a failure path, because otherwise a fault that retrying cannot fix is retried for the whole window and the dead-letter record is delayed by every attempt.

If you are measuring latency rather than correctness, a per-call aws CLI invocation adds its own process startup time, which can dominate the delivery time you are trying to measure. You SHOULD use an SDK in a single process for that.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
AWS
Publisher
AWS (Official)
Source
aws/agent-toolkit-for-aws · skills/specialized-skills/serverless-skills/amazon-eventbridge-event-bus · commit 0a218f8
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • NOTICE (added by AutoGineer from NOTICE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by AWS or AWS.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download amazon-eventbridge-event-bus.zip