CDK: put aws apigateway events on to default bus in EventBridge

0

As I understand in order to put events on to the default bus, I need to associate/create a role with PutEvents permission. How can I do that in cdk to put aws apigateway events on to default bus. Thanks

1 回答
1

To add additional permissions to you function use the addToRolePolicy method.

As a basic example for EventBridge.

myFunction.addToRolePolicy(new iam.PolicyStatement({ 
      actions: ['events:PutEvents'],
      resources: ['*'],
    }))
AWS
Marco
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则