Ability to provide custom role for aws-events-targets #8255
Labels
@aws-cdk/aws-events-targets
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
in-progress
This issue is being actively worked on.
p1
Currently if you wish to use a SfnStateMachine target from CloudWatch events it will generate a new Role and Policy document for executing the state machine. I believe this also applies for the other target types as well.
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-events-targets/lib/state-machine.ts#L34-L37
I would like to be able to provide or override the role used.
Use Case
Our organisational controls don't allow for arbitrary new roles and policies to be added like this. We have predetermined roles we can use for our services, and if new permissions are required they are handled centrally.
Being able to provide the execution role here allows our security team to retain control of IAM roles and policies.
Proposed Solution
Add an override or optional parameter for passing an existing role to the AWS::Events::Rule that it will use.
Other
It would probably make sense to add this override for all of the event targets for consistency.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: