Interview Prep/AWS/Global Infrastructure and IAM Basics

What is the AWS credential provider chain?

IntermediateConceptGlobal Infrastructure and IAM Basics
Answer

SDKs and the CLI look for credentials in a fixed order: explicit parameters, environment variables (AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN), shared config/credentials files and profiles (including SSO and role_arn), web identity token (AWS_WEB_IDENTITY_TOKEN_FILE, used by EKS and GitHub OIDC), container credentials (ECS task role), and finally the EC2 instance metadata service.

This is why a stray AWS_ACCESS_KEY_ID in a shell silently overrides the instance role. When debugging "wrong account" issues, run aws sts get-caller-identity first.

aws All AWS questions Roadmap: AWS core services

More on Global Infrastructure and IAM Basics