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 Resposta
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
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas