Skip to content

aws-events: no way to set Id on Rule Target #37025

@alex-at-cascade

Description

@alex-at-cascade

Describe the bug

The API https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html#API_PutTargets_RequestSyntax allows setting an Id value for a rule target. However, CDK does not appear to have a way to set this value, instead using values like Target0. (Having imported into CDK some infrastructure that had been created with the API, those resources now show as "drifted".)

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

Allow defining the Id of these resources.

Current Behavior

No way to define the Id.

Reproduction Steps

Try to set the Id of a rule target.

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.233.0

AWS CDK CLI version

2.1100.3

Node.js Version

24

OS

MacOS

Language

TypeScript

Language Version

TypeScript (5.9.3)

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eventsRelated to CloudWatch EventsbugThis issue is a bug.effort/mediumMedium work item – several days of effortp3

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions