Skip to content
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

iam-policy-generator's PolicyStatement' is not assignable to parameter of @aws-cdk's PolicyStatement #24

Closed
tkasuz opened this issue May 12, 2020 · 1 comment

Comments

@tkasuz
Copy link

tkasuz commented May 12, 2020

I've tried to attach Amazon Rekognition access policies to Lambda following the example

hanlder.addToRolePolicy(
    new PolicyStatementFactory()
    .setEffect(iam.Effect.ALLOW)
    .addAction(Action.REKOGNITION.DETECT_FACES)
    .build()
    );

but it says

Argument of type 'import("iam-policy-generator/node_modules/@aws-cdk/aws-iam/lib/policy-statement").PolicyStatement' is not assignable to parameter of type 'import("/@aws-cdk/aws-iam/lib/policy-statement").PolicyStatement'.

Environment
Node.js: 12.16.1
iam-policy-generator: ^1.1.1
@aws-cdk/aws-iam: 1.31.0

@aletheia aletheia added this to the v2.0.0 milestone May 19, 2020
@nihakue
Copy link

nihakue commented May 29, 2020

Having the same issue. Could it be a similar problem to aws/aws-cdk#979 ? With Typecript's weird private property constraints?

@aws-cdk/aws-iam@1.32.2
NodeJS: 12 LTS
Mac
iam-policy-generator@1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants