INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Designing event-driven processing

Amazon EventBridge: how rule matching and target delivery work

An EventBridge event bus checks incoming events against rules and sends matching events to their configured targets. Follow a fictional image conversion request from arrival at the bus through a rule match, target delivery and successful processing.

What you will learn

Read a sample event and pattern, distinguish a mismatch from failed delivery or failed processing, and identify the evidence to check at each stage.

Prerequisite

An event is data about something that happened. Knowing that an SQS queue holds work for a consumer helps distinguish a queue from an event bus. This lesson covers the default event bus and Classic event buses that use rules, with fixed examples that require no live AWS access.

An event bus directs matching events to their targets

The intake service publishes an event. The bus takes in that event, the rule compares it to an event pattern, and the target receives matching events. In some configurations one event can match multiple rules.

Fictional image intake: identify the last step you can confirm
Fictional image intake: identify the last step you can confirm1: Intake service — Send the event — Event bus. 2: Event bus — Compare the incoming data — Conversion rule. 3: Conversion rule — Deliver on a match — Conversion queue123Intake serviceEvent busConversion ruleConversion queueFictional image intake: identify the last step you can confirm1: Intake service — Send the event — Event bus. 2: Event bus — Compare the incoming data — Conversion rule. 3: Conversion rule — Deliver on a match — Conversion queue123Intake serviceEvent busConversion ruleConversionqueue
  1. Intake service → Event busSend the event
  2. Event bus → Conversion ruleCompare the incoming data
  3. Conversion rule → Conversion queueDeliver on a match
Intake service
Publishes an intake event
Event bus
Receives the event
Conversion rule
Matches the source and event type
Conversion queue
Receives the request as the target

Read a match across the source and event type

A fixed event pattern for the conversion rule
{
  "source": [
    "example.image-intake"
  ],
  "detail-type": [
    "Image accepted"
  ]
}

The pattern has two fields. An event matches if its source is example.image-intake and its event type is Image accepted. In the table, A matches. B and C each differ on one field.

Sample inputs when the bus receives all three events
Inputsourcedetail-typeMatch result
Aexample.image-intakeImage acceptedMatches. EventBridge can attempt delivery to the configured target.
Bexample.image-intakeImage rejectedDoes not match this rule because the event type differs.
Cexample.batch-importImage acceptedDoes not match this rule because the source differs.

A total count cannot tell you whether to widen the pattern. Compare intake records with available bus evidence, including the actual event values, the bus that received the event and the type the rule expects. A broader rule could send unintended B or C inputs to downstream processing.

After a match, distinguish target delivery from processing

A rule can match even when the target fails to accept the event. For retryable delivery errors, EventBridge follows the target retry policy. A higher attempt limit alone may leave a permission problem unresolved.

A target dead-letter queue in EventBridge can capture events that failed to reach the target. A dead-letter queue configured for an SQS source queue can isolate messages based on their receive count. Both mechanisms can use SQS queues. Check which system put the event or message there and where the failure occurred.

Evidence to inspect when the converted image for A is missing
Confirmed so farWhat to compare nextDecision
The event reached the busSource, event type and rule patternVerify the input and match result.
The rule matched, but target delivery failedTarget, permissions and failed-delivery evidence, including the DLQ if configuredIdentify the cause before choosing a recovery action.
The queue accepted the requestThe matching consumer record, the stored result and duplicate handlingAssess delivery and conversion separately.

Choose the evidence that follows from each stage

Choose an option to see the result and explanation.

Which inputs match the fixed event pattern?
Read the answer and reason

Answer: A only · Only A has both required values.

B reached the bus, but the conversion queue did not receive it. What should you check first for this rule?
Read the answer and reason

Answer: Compare the event type with the pattern · In this example, B did not match, so the rule did not attempt target delivery.

A matched the rule. A permissions issue prevented delivery to the queue. What should you inspect next?
Read the answer and reason

Answer: The target, relevant permissions and delivery-failure records · The target and its permissions are the next places to check.

The queue accepted A. What evidence can tell you whether conversion finished?
Read the answer and reason

Answer: The matching consumer record and stored output · Connect a consumer record and an output image to the same request.

Check, then explain in your own words

  1. Compare the actual source and event type against the values expected by the rule.
  2. For a failed delivery after a match, check the target and its permissions.
  3. After the queue accepts the request, check the consumer records and business result for that request.
Check your understanding: Delivery to the conversion queue succeeded, but the image is missing. Where should you look first?

Check the consumer’s processing records and where it saves the output.

Delivery to the queue is already confirmed. Use the same request to trace when conversion began, where it failed or where the result was stored.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.