Skip to content

Commit 642cbd4

Browse files
committed
feat(blog-article): PR feedback -- IAM trust policy with AWS SSO roles
1 parent 7fbe719 commit 642cbd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/blog/fix-iam-trust-policy-errors-using-aws-sso-regional-arn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ This reveals the critical information:
112112
}
113113
```
114114

115-
Notice the `/us-west-2/` in the path! When AWS SSO is configured outside of `us-east-1`, the role path includes the region. This means your condition pattern needs to account for this regional component.
115+
Notice the `/us-west-2/` in the path! When AWS IAM Identity Center & SSO is configured outside of `us-east-1`, the role path includes the region. This means your condition pattern needs to account for this regional component.
116116

117117
**Your assumed role ARN**: `arn:aws:sts::111111111111:assumed-role/AWSReservedSSO_AWSAdministratorAccess_9999999999999999/user`
118118

119119
**Actual IAM role ARN**: `arn:aws:iam::111111111111:role/aws-reserved/sso.amazonaws.com/us-west-2/AWSReservedSSO_AWSAdministratorAccess_9999999999999999`
120120

121-
The trust policy pattern `arn:aws:iam::111111111111:role/aws-reserved/sso.amazonaws.com/AWSReservedSSO_AWSAdministratorAccess*` doesn't match because it's missing the `/us-west-2/` region component.
121+
Your trust policy should include the region in the path, exactly like the IAM role ARN above. It's worth noting that if Disaster Recovery (multi-region) is a priority or when using IaC such as Terraform, instead of hardcoding the region like us-west-2, it may be better to use `/*/` (which doesn't impose any security risks either). (e.g. `arn:aws:iam::*:role/aws-reserved/sso.amazonaws.com/*/AWSReservedSSO_AWSAdministratorAccess*`)
122122

123123
## Why This Gotcha / Edge Case Exists
124124

@@ -128,7 +128,7 @@ As for why `us-east-1` doesn't have the regional path, it's likely because AWS c
128128

129129
## Example IAM Trust Policy
130130

131-
Here's an example IAM trust policy that allows SSO users from the Administrator permission set to assume the target role:
131+
Here's an example IAM trust policy that allows SSO users from the Administrator permission set to assume the target role, if the IAM Identity Center is provisioned outside of `us-east-1`:
132132

133133
```json
134134
{

0 commit comments

Comments
 (0)