question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a check that CloudWatch Events Rules have <= 5 targets

See original GitHub issue

cfn-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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kddejongcommented, Aug 22, 2018

Thanks. These are the best type of rules for us to add. We’ll get this added.

0reactions
kddejongcommented, Aug 24, 2018

Thanks for checking that should make things easier. It would have been an odd rule if it was a soft limit.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found