Free — no signup required

Targets and Delivery Guarantees

2 min read

A target is the AWS service that EventBridge invokes when a rule matches. EventBridge supports over 20 native target types, including Lambda functions, SQS queues, SNS topics, Step Functions state machines, Kinesis Data Streams, ECS tasks, API Gateway endpoints, and even other EventBridge buses (for cross-account routing).

Input Transformation

By default, EventBridge sends the entire event JSON to the target. But often, your Lambda function only needs a subset of the data, or your SQS consumer expects a different JSON structure. Input Transformers let you reshape the event before delivery.

You define two things:
1. Input Path: A map of variables extracted from the event using JSONPath.
2. Input Template: A template string that uses those variables to construct the new payload.

// Input Path (extract fields)
{
  "orderId": "$.detail.orderId",
  "total": "$.detail.total",
  "customer": "$.detail.customerId"
}

// Input Template (reshape output)
{
  "message": "Order <orderId> placed by <customer> for $<total>",
  "orderReference": "<orderId>"
}

The target receives the transformed payload, not the original event. This is powerful for integrating with systems that expect a specific JSON structure.

Delivery Guarantees and Retries

EventBridge provides at-least-once delivery — it guarantees an event will be delivered to a matching target at least once, but in rare failure scenarios, it may deliver the same event more than once. Your consumers must be idempotent (processing the same event twice produces the same result as processing it once).

When a target invocation fails (e.g., the Lambda function throws an error, or the SQS queue is unreachable), EventBridge retries with exponential backoff for up to 24 hours.

Dead-Letter Queues (DLQ)

If an event cannot be delivered after all retries are exhausted, it is dropped — unless you configure a Dead-Letter Queue (DLQ). A DLQ is an SQS queue where undeliverable events are sent for later inspection and reprocessing.

# Configure a DLQ on a rule target using AWS CLI
aws events put-targets \
  --rule "HighValueOrderRule" \
  --event-bus-name "ecommerce-fulfillment-bus" \
  --targets '[{
    "Id": "FraudReviewTarget",
    "Arn": "arn:aws:states:us-east-1:123456789012:stateMachine:FraudReview",
    "DeadLetterConfig": {
      "Arn": "arn:aws:sqs:us-east-1:123456789012:eventbridge-dlq"
    }
  }]'

Key Point: Always configure a DLQ for production rules. Without one, failed events vanish silently. A DLQ gives you an audit trail of delivery failures and a mechanism to replay events after fixing the underlying issue. Monitor your DLQ depth with a CloudWatch alarm — a non-zero DLQ depth should page your on-call engineer.

This is one of 18 chapters

Get every chapter — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

See pricing