Add a check that CloudWatch Events Rules have <= 5 targets
See original GitHub issuecfn-lint version: (cfn-lint --version
) 0.5.0 (but nothing changed since afaict)
Description of issue.
CloudWatch Events has a limit of 10 targets per Rule, but this isn’t validated by ValidateTemplate
or cfn-lint
’s rules. Consequently one has to wait til deploy time to discover this error message:
CREATE_FAILED: At most 10 targets allowed.
Failing template:
Resources:
MyCronRule:
Type: AWS::Events::Rule
Properties:
ScheduleExpression: cron(0 6 * * ? *)
Targets:
- Id: Job1
Arn: arn:target
- Id: Job2
Arn: arn:target
- Id: Job3
Arn: arn:target
- Id: Job4
Arn: arn:target
- Id: Job5
Arn: arn:target
- Id: Job6
Arn: arn:target
- Id: Job7
Arn: arn:target
- Id: Job8
Arn: arn:target
- Id: Job9
Arn: arn:target
- Id: Job10
Arn: arn:target
- Id: Job11
Arn: arn:target
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Add a check that CloudWatch Events Rules have <= 5 ...
According to https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/cloudwatch_limits_cwe.html the limit is actually 5 targets per rule. At ...
Read more >AWS::Events::Rule Target - AWS CloudFormation
Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be...
Read more >put-targets — AWS CLI 2.9.5 Command Reference
Each rule can have up to five (5) targets associated with it at one time. You can configure the following as targets for...
Read more >amazon web services - Codepipeline not creating new rule
I know my event rule has 5/5 targets and there is a limit so the new target cannot be added. However, I am...
Read more >Sending and Receiving an event through EventBridge with ...
By adding two targets which is simple pub/sub implementation as Amazon SNS, Amazon SQS and ... Basically, rule will check our event data....
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 Free
Top 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
Thanks. These are the best type of rules for us to add. We’ll get this added.
Thanks for checking that should make things easier. It would have been an odd rule if it was a soft limit.