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.

[aws-events] "Rule" support input roleArn

See original GitHub issue

aws event L2 Rule support input exist roleArn.

Use Case

see can input roleArn you want . But L2 library Rule do not support input exist roleArn see

Proposed Solution

Wish Rule can add Properties like role to add exist role to Rule.

   const rule = new events.CfnRule(this, 'RdsExporterCfnRule', {
      description: 'Export snapshots from GP RDS to S3 at 2:30 am every day',
      name: 'exporter',
      scheduleExpression: 'cron(30 2 * * ? *)',
      roleArn: 'arn:aws:iam::012345678912:role/Exsit_Event_Role',

example for L2 Rule add role properties

    const rule = new events.Rule(this, 'RdsExporterRule', {
      description: 'Export snapshots from GP RDS to S3 at 2:30 am every day',
      ruleName: 'GP_exporter',
      schedule: events.Schedule.expression('cron(30 2 * * ? *)'),
      role: Exsit_Event_Role,


  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

wulfmanncommented, Nov 12, 2020

You can also set the role arn on the actual events.Target.

In the meantime you can override the rule’s rolearn with:

const role = new iam.Role(this, `Role`, {
    assumedBy: new iam.ServicePrincipal('')
const rule = new events.Rule(this, ``, {
const cfnRule = rule.node.defaultChild as events.CfnRule;
cfnRule.addPropertyOverride('RoleArn', role.roleArn)
github-actions[bot]commented, Nov 30, 2020


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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::Events::Rule - AWS CloudFormation
The following example creates a rule that notifies an Amazon Simple Notification Service topic if an AWS CloudTrail log entry contains a call...
Read more >
AWS::Events::Rule Target - Amazon CloudFormation
Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value...
Read more >
AWS Event Rule doesn't work - Stack Overflow
I don't think AWS::Events::Rule supports RoleArn as one of its properties. You may refer link here ...
Read more >
aws_cloudwatch_event_target | Resources | hashicorp/aws
EventBridge was formerly known as CloudWatch Events. ... resource "aws_cloudwatch_event_target" "yada" { target_id = "Yada" rule ...
Read more >
aws::cloudwatch-event-rule — Gyro 1.2.0 documentation
The IAM role arn that gives permission to invoke actions on the target resource. input: The input json text that triggers an action...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found