(aws-iam): Inconsistency in resource grant permissions when importing a role using fromRoleName() and fromRoleArn() #28363
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
The grant permissions are producing different synth outputs/missing permissions when using fromRoleName() vs fromRoleArn()
Example -
Bug behaviour
In the resultant template, the bucket policy and KMS key policy will be missing permissions for the role. But an IAM policy will be created and attached to the role.
Expected -
In the above example, both s3 policy and KMS policy is updated with role permissions as well as an IAM policy will be created and attached to the role.
Expected Behavior
When using fromRoleName(), resource policy as well as IAM policy be updated/modified.
Current Behavior
Resource policy is missing when using fromRoleName()
Reproduction Steps
In Description
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.114.1
Framework Version
No response
Node.js Version
18.18.2
OS
macos
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: