The AWS CLI is a thin, consistent wrapper over every AWS API — once you know the aws SERVICE ACTION pattern and how auth resolves, most service-specific commands are guessable. This hub covers CLI setup and identity; each service below has its own dedicated page.
Configuration & Identity
aws configureInteractively sets the default access key, secret key, region and output format.
aws configure listShows which credentials and region are currently active, and where each came from (env var, config file, etc.).
aws sts get-caller-identityShows the account, user/role ARN and user ID for whatever credentials are currently active — the fastest way to confirm you're authenticated as who you think you are.
aws configure --profile stagingConfigures a named profile instead of the default one.
aws s3 ls --profile stagingRuns any command against a named profile instead of the default credentials.
Credential resolution order
Environment variables (AWS_ACCESS_KEY_ID) win over the --profile flag, which wins over ~/.aws/credentials,
which wins over an EC2/ECS instance role. A confusing "wrong account" error is very often a stray env var left
over from a different terminal session.
Output & Query
aws ec2 describe-instances --output tableFormats output as a readable table instead of the default JSON.
aws ec2 describe-instances --query "Reservations[].Instances[].InstanceId"Applies a JMESPath query to extract just the fields you need, instead of parsing full JSON output yourself.
aws ec2 describe-instances --output textTab-separated plain text output — the easiest format to pipe into awk or cut.
Regions
aws ec2 describe-regions --output tableLists every AWS region.
aws ec2 describe-instances --region eu-west-1Overrides the default region for a single command.
Services
- IAM — identity, roles and policies
- EC2 — virtual machines
- S3 — object storage
- VPC — networking
- EKS — managed Kubernetes
- Lambda — serverless functions
- CloudWatch — logs, metrics and alarms
See the AWS Interview Questions tab for architecture and security concepts.