Replace the trust policy on an existing role.
Section: Roles, Trust, and Access Keys
Update a role trust policy
bash
bash
aws iam update-assume-role-policy --role-name AppRole --policy-document file://trust-policy.jsonExplanation
Useful when adding or tightening OIDC and cross-account trust.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Roles, Trust, and Access Keys