How consistent is IAM, and what does that mean for automation?
BeginnerConceptIAM Advanced, STS and Multi-Account
Answer
IAM is eventually consistent: a newly created role, policy change or attachment may take seconds to propagate across Regions' IAM endpoints. Scripts that create a role and immediately use it can fail with InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda or AccessDenied.
Terraform and CloudFormation add retries; in shell scripts add a short wait-and-retry loop and avoid putting IAM changes in the critical path of high-frequency flows.
More on IAM Advanced, STS and Multi-Account
Explain the IAM policy evaluation logic.AdvancedHow does cross-account access evaluation differ from same-account?AdvancedHow does `sts:AssumeRole` work, step by step?IntermediateWhat is the difference between AssumeRole, AssumeRoleWithWebIdentity and AssumeRoleWithSAML?IntermediateWhat is a permission boundary and when would you use one?IntermediateWhat do Service Control Policies do and not do?Intermediate