(aws-events-targets): Event Rule Targets do not apply to multiple Lambda Functions
See original GitHub issueWhen applying Event Rules to multiple Lambda targets it only applies to one function. When you edit the rule in the console and update (without change), the rules apply the desired targets correctly.
Reproduction Steps
- Target > 1 function in rule definition
- Deploy via CDK Pipeline
- Verify in Console that lambda_target_2 is missing an event source
- Edit Rule in EventBridge console
- Press Update
- Verify lambda_target_2 function now has an event source
events.Rule(self, "Every1Mins",
schedule=events.Schedule.rate(core.Duration.minutes(1)),
targets=[lambda_target_1, lambda_target_2]
)
What did you expect to happen?
Event source to be deployed to all defined targets
What actually happened?
As above, one 1 function receives the event source
Environment
- CDK CLI Version : 1.83
- Framework Version: 1.83
- Node.js Version: As per aws/codebuild/standard:4.0
- OS : As per aws/codebuild/standard:4.0
- Language (Version): Python 3.8
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
aws-cdk/aws-events-targets module - AWS Documentation
The code snippet below creates an event rule with a Lambda function as a target triggered for every events from aws.ec2 source. You...
Read more >Triggers lambda {eventName} - awslabs/aws-cdk - Gitter
I have the rules all setup and I can setup an EventSource when it's from SQS but ... eventstargets = require('@aws-cdk/aws-events-targets'); new events....
Read more >How to use AWS CDK to set EventBridge Rule Target for ...
I found it: the event rule takes type IFunction , and since IAlias and IVersion both extend IFunction , so we can take...
Read more >aws-cdk.aws-events-targets - Python package - Snyk
The code snippet below creates an event rule with a Lambda function as a target triggered for every events from aws.ec2 source. You...
Read more >@aws-cdk/aws-events - npm
Targets can include Amazon EC2 instances, AWS Lambda functions, ... A single rule can route to multiple targets, all of which are processed ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm, we do have the same issue. As a temp workaround, we created a new rule for each lambda.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.