Skip to content
Advertisement

AWS CDK How to include principals in IAM policy?

Hi I am working on AWS CDK. I am trying to create resource based policy. Below is my cloud formation template.

JavaScript

Below I am trying to create same using CDK.

JavaScript

This results in below error

Error: Expected object reference, got “arn:aws:iam::123:root”

Can someone help me to write correct syntax using python? Any help would be appreciated. Thanks

Advertisement

Answer

principals needs to be a list of IPrincipal instead of strings

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement