-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Description:
When creating an Lambda function with inline EventBridgeRule
events, the target
property of the translated rules use an ID value of self.logical_id + "LambdaTarget"
. Logical ID in this case is the logical ID of function itself, concat the name given to the event. So if those two things combine to more than ~52 characters, the attempt to create the rule will fail with an invalid id.
Steps to reproduce the issue:
- Create a function with a resource name like
CdPipelineEventsTargetLambdaFunction
- Add an event with a name like
ActionsEventsRule
Observed result:
1 validation error detected: Value 'CdPipelineEventsTargetLambdaFunctionActionsEventsRuleLambdaTarget' at 'targets.1.member.id' failed to satisfy constraint: Member must have length less than or equal to 64 (Service: AmazonCloudWatchEvents; Status Code: 400; Error Code: ValidationException; Request ID: d7368367-3408-45ba-a8d2-8117e4c5e771; Proxy: null)
Expected result:
Some sort of truncation, I guess, to ensure that the rule can be created