aws_iam: Cannot use a service or account principal with grantAssumeRole, use assumeRolePolicy instead. #29782
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
Since version 2.136 trying to grant assume role to a principal results in an error.
Code example:
Error:
@jsii/kernel.RuntimeError: Error: Cannot use a service or account principal with grantAssumeRole, use assumeRolePolicy instead.
Expected Behavior
No error expected
Current Behavior
@jsii/kernel.RuntimeError is observed
Reproduction Steps
Grant assume role to an AWS principal.
Possible Solution
Breaking change happened in 2.136 release:
iam: grantAssumeRole silently fails with service and account principals (#29452) (36fd79d), closes #24507
Additional Information/Context
No response
CDK CLI Version
2.136.1
Framework Version
No response
Node.js Version
18
OS
AL2
Language
Python
Language Version
3.9
Other information
No response
The text was updated successfully, but these errors were encountered: