Skip to content

aws-events-targets: retryAttempts = 0 does not work as intended #21864

@sunhyung

Description

@sunhyung

Describe the bug

Hi team,

I am working on EventBridge via CDK and got an issue with retryAttempts property.
After creating a rule, I tried to set a target with retryAttempts = 0 but CDK has set retryAttempts as default value instead of 0.

Expected Behavior

      myRule.addTarget(
        new targets.LambdaFunction(myLambda, {
          retryAttempts: 0,
          ...

This code should set retryAttempts value as 0.

Current Behavior

Instead of setting 0, the code set retryAttempts as default value which is 185.

Reproduction Steps

  1. Create a rule.
  2. Set a target with retryAttempts = 0.
  3. Deploy a stack.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.39.1

Framework Version

No response

Node.js Version

16.13.1

OS

MS Windows 10

Language

Typescript

Language Version

TypeScript (3.9.10)

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions