-
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
aws_iam: iam.ManagedPolicy returns "Don't know how to convert object to JSON" #29852
Comments
hi @marikb . thanks for reaching out. I tried to use the example 1 and was able to succeed. Here is the snapshot - and the policy generated -
Hope this would be helpful. let us know if this does not work for you |
Hey @khushail, apparently the issue was not related to the function but to a spare enter I've had in my class definition (Specifically in my super().init(scoped **kwargs) ) However, the error was not informative enough for me to address it at first. Closing the issue. |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
Converting PolicyDocument to json with to_json() function seems to work but in iam.managedPolicy I fails with the error "Don't know how to convert object to JSON"
Expected Behavior
Create the Iam.ManagedPolicy after I run the cdk synth command.
Current Behavior
Error: "Don't know how to convert object to JSON".
Reproduction Steps
I've tried running via statement and document variables (Two examples):
statements:
Or via document*:
I want to just make it work but ideally with JSON files like in the second example to support loading policies from policies folder.
Possible Solution
At the moment it seems to me like an aws cdk issue.
Additional Information/Context
No response
CDK CLI Version
2.137.0 (build bb90b4c)
Framework Version
No response
Node.js Version
v20.11.1
OS
Windows
Language
Python
Language Version
Python 3.11.9
Other information
No response
The text was updated successfully, but these errors were encountered: