IRole vs Role types in aws_apigateway.IntegrationOptions
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
-
I'm submitting a ...
- [x] :beetle: bug report
- [ ] :rocket: feature request
- [ ] :books: construct library gap
- [ ] :phone: security issue or vulnerability => Please see policy
- [ ] :question: support request => Please see note at the top of this template.
-
What is the current behavior? If the current behavior is a :beetle:bug:beetle:: Please provide the steps to reproduce
I'm trying to take an existing IAM Role when integrating API Gateway with AWS services.
However, aws_iam.Role.from_role_arn(...) returns aws_cdk.aws_iam.IRole, while the credentials_role in aws_apigateway.IntegrationOptions(...) only takes aws_cdk.aws_iam.Role.
-
What is the expected behavior (or behavior of feature suggested)?
aws_apigateway.IntegrationOptions(...)should takeaws_cdk.aws_iam.IRoleas the input type -
What is the motivation / use case for changing the behavior or adding this feature? Fix bug.
Otherwise, cannot reuse some existing IAM Role.
-
Please tell us about your environment:
- CDK CLI Version: 1.0.0
- Module Version: 1.0.0
- OS: [all | Windows 10 | OSX Mojave | Ubuntu | etc... ]
- Language: [Python ]
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
jsii.errors.JSIIError: Object of type @aws-cdk/aws-iam.IRole is not convertible to @aws-cdk/aws-iam.Role
Bug still exists in the latest 1.0.0 version.
@guangyuzh does this help you? https://github.com/aws/aws-cdk/pull/3369