-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRole vs Role types #1506
Comments
This is a bug in our Lambda resource. It should accept an If you are using typescript, as a temporary workaround, you might be able to add Thanks for reporting! |
If so, that's a mistake in the Lambda construct, because you're doing it right. Use a CloudFormation override to work around that for the time being. |
holy smokes, I was going nuts trying to figure this out. I'm new to Typescript so I couldn't figure out where I was going wrong. Can you point me to what a CloudFormation override looks like? |
Here you go: https://awslabs.github.io/aws-cdk/aws-construct-lib.html#access-the-aws-cloudformation-layer Elad's suggestion will probably also work btw, and is simpler. |
|
Fixed by #1509 |
Looks like this problem has returned. I had the exact same issue, and the "as any" fix seems to work. My error is: using cdk 1.89.0 (build df7253c) |
Same problem
Pylint sends a warning that 'Role' is not assignable to 'IRole' |
I'm having trouble understanding how I would import a role that has already been created, and use that role when creating a lambda function. The
Role.import
returns a type IRole, which is not assignable to the props when creating a Lambda function.The text was updated successfully, but these errors were encountered: