aws --versionUseful for troubleshooting auth, SSO, and output behavior differences between versions.
Comprehensive AWS CLI commands for configuration, profiles, global options, queries, and common cross-service recipes.
Verify the CLI and discover commands.
aws --versionUseful for troubleshooting auth, SSO, and output behavior differences between versions.
aws helpLists services, global options, and usage patterns.
aws ec2 helpUse this to discover commands, arguments, and examples for a service.
aws s3 cp helpDisplays the syntax, parameters, and examples for a subcommand.
Configure credentials, regions, named profiles, and identity center.
Set credentials, region, and output format interactively.
aws configureWrites values to your local AWS config and credentials files.
aws configure listUseful for checking which credentials, region, and profile are active.
aws configure list-profilesUseful when switching among multiple accounts and environments.
aws configure get region --profile prodReads a setting from your shared config file for the specified profile.
aws configure set region us-west-2 --profile prodWrites a value to the named profile in the shared config file.
Interactively create an SSO-backed profile.
aws configure ssoCreates a profile that uses temporary credentials sourced from IAM Identity Center.
aws sso login --profile sandboxStarts an authentication flow and caches short-lived credentials for the profile.
aws sts get-caller-identityOne of the most useful commands for validating the currently active credentials.
Use global flags, pagination, and JMESPath queries effectively.
aws ec2 describe-instances --region us-east-1Overrides any configured region for this invocation only.
aws s3 ls --profile prodOverrides the default profile for this invocation.
aws iam list-users --output tableUseful for quick interactive inspection.
aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,State:State.Name,Type:InstanceType}'The `--query` option applies a JMESPath expression to the response.
aws iam list-users --no-cli-pagerUseful in scripts and CI environments.
Fetch only the first page of a paginated result set.
aws logs describe-log-groups --no-paginateUseful for testing or when you intentionally want a single page only.
Reduce the number of items retrieved per service call.
aws ec2 describe-instances --page-size 25Can help long-running list operations avoid timeouts while still returning the full result set.
Return only a specific number of items in the CLI output.
aws iam list-users --max-items 10Useful when previewing large result sets.
aws dynamodb put-item --generate-cli-skeleton inputHelpful when crafting JSON input for complex commands.
aws ec2 run-instances --cli-input-json file://run-instances.jsonUseful when commands have many nested parameters.
Handy patterns used across many services.
aws ec2 describe-regions --query 'Regions[].RegionName' --output textHandy for scripts that validate or enumerate regions.
aws ec2 describe-availability-zones --query 'AvailabilityZones[].ZoneName' --output textUseful for subnet, EBS, and deployment planning.
aws ec2 create-tags --resources i-0123456789abcdef0 --tags Key=Name,Value=web-01 Key=Env,Value=prodMany AWS services expose service-specific tagging commands or APIs.
aws ec2 wait instance-running --instance-ids i-0123456789abcdef0Waiters poll the service until a known condition is met or a timeout occurs.
aws sts get-caller-identity --debugHelpful for diagnosing signing, credential, region, and endpoint issues.