Skip to content

feat(events): add RetryPolicy support for EventBridge rule targets#700

Merged
zirkelc merged 1 commit intoserverless-operations:masterfrom
BANCS-Norway:feat-575-eventbridge-retry-policy
Mar 26, 2026
Merged

feat(events): add RetryPolicy support for EventBridge rule targets#700
zirkelc merged 1 commit intoserverless-operations:masterfrom
BANCS-Norway:feat-575-eventbridge-retry-policy

Conversation

@VirtueMe
Copy link
Copy Markdown
Collaborator

Summary

  • Adds retryPolicy configuration to schedule (eventBus method) and cloudwatchEvent/eventBridge events
  • Emits a CloudFormation RetryPolicy on the AWS::Events::Rule target with MaximumEventAgeInSeconds and MaximumRetryAttempts

Closes #575

Example

stateMachines:
  myMachine:
    events:
      - schedule:
          rate: rate(10 minutes)
          retryPolicy:
            maximumEventAgeInSeconds: 3600
            maximumRetryAttempts: 3
      - eventBridge:
          event:
            source:
              - aws.ec2
          retryPolicy:
            maximumEventAgeInSeconds: 7200
            maximumRetryAttempts: 5

Test plan

  • Unit tests added for compileCloudWatchEventEvents (cloudwatchEvent + eventBridge)
  • Unit tests added for compileScheduledEvents (eventBus method)
  • Verified RetryPolicy is absent when retryPolicy is not configured
  • Full test suite passes (452 tests)

🤖 Generated with Claude Code

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/serverless-operations/serverless-step-functions@700

commit: 0a37a43

@zirkelc
Copy link
Copy Markdown
Collaborator

zirkelc commented Mar 23, 2026

Please add to README

Allows users to configure `retryPolicy` on `schedule` (eventBus method)
and `cloudwatchEvent`/`eventBridge` events, emitting a CloudFormation
`RetryPolicy` on the target with `MaximumEventAgeInSeconds` and
`MaximumRetryAttempts`.

Closes serverless-operations#575

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@VirtueMe VirtueMe force-pushed the feat-575-eventbridge-retry-policy branch from adde11e to 0a37a43 Compare March 23, 2026 08:29
@VirtueMe
Copy link
Copy Markdown
Collaborator Author

VirtueMe commented Mar 23, 2026

Added the missing README section documenting retryPolicy for schedule and eventBridge/cloudwatchEvent events, including a TOC entry and example.

@zirkelc zirkelc merged commit 1191e1d into serverless-operations:master Mar 26, 2026
3 checks passed
@VirtueMe VirtueMe deleted the feat-575-eventbridge-retry-policy branch March 26, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Retry Policy in Eventbridge rule targets

2 participants