D

AWS

AWS CLI fundamentals and links to the individual service references.

Updated 2026-09-03

On this page

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 configure

Interactively sets the default access key, secret key, region and output format.

aws configure list

Shows which credentials and region are currently active, and where each came from (env var, config file, etc.).

aws sts get-caller-identity

Shows 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 staging

Configures a named profile instead of the default one.

aws s3 ls --profile staging

Runs 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 table

Formats 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 text

Tab-separated plain text output — the easiest format to pipe into awk or cut.

Regions

aws ec2 describe-regions --output table

Lists every AWS region.

aws ec2 describe-instances --region eu-west-1

Overrides 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.

Official documentation