Skip to content

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

Open
VirtueMe wants to merge 1 commit intoserverless-operations:masterfrom
BANCS-Norway:feat-575-eventbridge-retry-policy
Open

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

Conversation

@VirtueMe
Copy link
Contributor

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

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
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
Contributor 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.

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