Interview Prep/AWS/IAM Best Practices

What does `aws:PrincipalOrgPaths` let you do?

IntermediateProductionIAM Best Practices
Answer

It matches the OU path of the calling account, so a resource policy can grant access to "any account in the Prod OU" instead of a fixed account list. New accounts in that OU get access automatically; accounts moved out lose it.

"Condition": {"ForAnyValue:StringLike": {
  "aws:PrincipalOrgPaths": "o-abc123xyz/r-ab12/ou-ab12-prod1234/*"}}
aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices