[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
- Target settings.
PutTargetsaccepts a target'sRetryPolicy(MaximumRetryAttempts0 to 185,MaximumEventAgeInSeconds60 to 86400) andDeadLetterConfig(Arn), rejects out-of-range values with400 ValidationException, andListTargetsByRulereturns them (Target API reference). - 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.
- 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_CONDITIONandRETRY_ATTEMPTSmessage attributes (Using dead-letter queues).
Actual behavior
PutTargetsdropsRetryPolicyandDeadLetterConfig.ListTargetsByRulenever returns them, and invalid values are accepted.- 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
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 ValidationExceptionEnvironment
- Floci version / image tag:
mainat e6ee34676 - Java SDK version (if applicable): AWS SDK for Java v2
- How you're running Floci (Docker / native /
mvn quarkus:dev):mvn quarkus:devand the Docker image
Source: floci-io/floci