This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
aws iam: cannot modify trust relationship of imported role #23471
Labels
You can continue the conversation there. Go to discussion →
Describe the feature
Currently there is no way to add a new role to a trust relationship to an imported role.
The solution suggested in the issue #22550 cannot work as there is no 'assume_role_policy' in an imported role, regardless of immutability.
As I am using the python cdk library, there are multiple levels of abstraction as well.
Use Case
I have a mediator role inside my Stack in my main region X, which will be assumed by a regional role that exists in all my regional stacks.
I want to import the main mediator role on the other stacks (using from_role_arn), and allow specifically to the regional stack role to assume, by adding only it to the mediator role trust policy.
Proposed Solution
Either:
Or:
Add a new function of add_trusted_assuming_role in order to allow to dynamically add to trusted policy. this is also what the issue aws-iam: Make setting trust on roles more clear in overview and function descriptions #22550 expected from 'grant_assume_role'
Other Information
No response
Acknowledgements
CDK version used
python aws-cdk-lib 2.54.0
Environment details (OS name and version, etc.)
Python
The text was updated successfully, but these errors were encountered: