#4735·floci

[FEAT] EventBridge: target RetryPolicy and DeadLetterConfig are not applied

Author: mariotoffiaCreated Sep 30, 2026Updated Sep 30, 2026
Labelsenhancementeventbridge

Service

EventBridge

AWS API Action

PutTargets, ListTargetsByRule and PutEvents (JSON 1.1, X-Amz-Target: AWSEvents.*), plus delivery from scheduled rules.

Expected behavior

  1. Target settings. PutTargets accepts a target's RetryPolicy (MaximumRetryAttempts 0 to 185, MaximumEventAgeInSeconds 60 to 86400) and DeadLetterConfig (Arn), rejects out-of-range values with 400 ValidationException, and ListTargetsByRule returns them (Target API reference).
  2. Retries. A failed delivery is retried with exponential backoff until the retry attempts or the event age run out. The defaults are 185 attempts and 24 hours (Event retry policy). Client-side errors such as a missing target or missing permissions are not retried.
  3. Dead-letter queue. An exhausted or non-retryable event is sent to the target's standard SQS dead-letter queue with the RULE_ARN, TARGET_ARN, ERROR_CODE, ERROR_MESSAGE, EXHAUSTED_RETRY_CONDITION and RETRY_ATTEMPTS message attributes (Using dead-letter queues).

Actual behavior

  1. PutTargets drops RetryPolicy and DeadLetterConfig. ListTargetsByRule never returns them, and invalid values are accepted.
  2. A failed target delivery is attempted once and then only logged as a WARN. It is never retried and never reaches a dead-letter queue, so an application's DLQ handling cannot be tested locally.

Reproduction

bash
aws --endpoint-url http://localhost:4566 sqs create-queue --queue-name orders-dlq
aws --endpoint-url http://localhost:4566 events put-rule --name orders --event-pattern '{"source":["orders"]}'
aws --endpoint-url http://localhost:4566 events put-targets --rule orders --targets '[{
  "Id": "missing-queue",
  "Arn": "arn:aws:sqs:us-east-1:000000000000:does-not-exist",
  "RetryPolicy": {"MaximumRetryAttempts": 2, "MaximumEventAgeInSeconds": 60},
  "DeadLetterConfig": {"Arn": "arn:aws:sqs:us-east-1:000000000000:orders-dlq"}
}]'
aws --endpoint-url http://localhost:4566 events list-targets-by-rule --rule orders
# RetryPolicy and DeadLetterConfig are missing
aws --endpoint-url http://localhost:4566 events put-events --entries '[{"Source":"orders","DetailType":"t","Detail":"{}"}]'
aws --endpoint-url http://localhost:4566 sqs receive-message \
  --queue-url http://localhost:4566/000000000000/orders-dlq --message-attribute-names All
# no message, expected the event with the dead-letter attributes

aws --endpoint-url http://localhost:4566 events put-targets --rule orders --targets '[{
  "Id": "bad", "Arn": "arn:aws:sqs:us-east-1:000000000000:orders-dlq",
  "RetryPolicy": {"MaximumEventAgeInSeconds": 0}
}]'
# succeeds, expected ValidationException

Environment

  • Floci version / image tag: main at e6ee34676
  • Java SDK version (if applicable): AWS SDK for Java v2
  • How you're running Floci (Docker / native / mvn quarkus:dev): mvn quarkus:dev and the Docker image