Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(events): rule cannot have more than 5 targets (#30470)
### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change This is a minor refactor for preventing an Event Rule to have at most 5 associated targets defined during a synth. This is the main limit set by EventBridge https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-quota.html#eb-limits ### Description of changes This is a very simple change in `aws-events` module to check if the `targets` array length of an `Event` is greater than 5. If it is then it throws an Error during build time. ### Description of how you validated changes Added a unit test by in `rule.test.ts` by verifying an Error is being thrown when a Rule has more than 5 associated targets. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information