Skill 2.1.3
Configure programmatic access to AWS.
Key Concepts
On AWS compute, use roles: instance profiles for EC2, execution roles for Lambda and task roles for ECS, which provide temporary credentials automatically. On a developer machine, configure the CLI with aws configure sso for IAM Identity Center, or with named profiles in ~/.aws/config and ~/.aws/credentials, selected with --profile or AWS_PROFILE.
SDKs and the CLI look for credentials in a fixed order: command-line options, environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN), shared config and credentials files, then container and instance roles. Long-term access keys should be avoided, rotated if they must be used, and never committed to source control.