Skip to content

Permit IAM Role Injection Into AwsCustomResource #4906

@reillykw

Description

@reillykw

Right now the AwsCustomResource creates the role that the lambda will use for resource CRUD. Would like it if the role could be injected. The alternative, of course, is an escape hatch with a deletion override and setting it there. This could be a preferred method of going around the current implementation. If that is the case I can close this issue.

Use Case

The IAM resource needed to run this code must be created in some other stack. I can't use this feature unless the Role can be referenced from another stack.

Proposed Solution

Add an IRole parameter for the AwsCustomResourceProps interface, optional, and if present is used for instantiation of the SingletonFunction.

Other

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

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

@aws-cdk/custom-resourcesRelated to AWS CDK Custom Resourcesfeature-requestA feature should be added or improved.in-progressThis issue is being actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions