LinuxCommandLibrary

aws

Manage Amazon Web Services from the command line

TLDR

Configure the AWS Command-line

$ aws configure wizard
copy

Configure the AWS Command-line using SSO
$ aws configure sso
copy

Get the caller identity (used to troubleshoot permissions)
$ aws sts get-caller-identity
copy

List AWS resources in a region and output in YAML
$ aws dynamodb list-tables --region [us-east-1] --output yaml
copy

Use auto prompt to help with a command
$ aws iam create-user --cli-auto-prompt
copy

Get an interactive wizard for an AWS resource
$ aws dynamodb wizard [new_table]
copy

Generate a JSON CLI Skeleton (useful for infrastructure as code)
$ aws dynamodb update-table --generate-cli-skeleton
copy

Display help for a specific command
$ aws [command] help
copy

SYNOPSIS

aws [global-options] <command> [<subcommand>] [<parameters>]

PARAMETERS

--debug
    Turn on debug mode for detailed output

--endpoint-url URL
    Override default endpoint URL

--no-verify-ssl
    Disable SSL certificate verification

--cli-read-timeout TIMEOUT
    Max CLI runtime for service calls

--cli-connect-timeout TIMEOUT
    Max socket connect time

--profile PROFILE
    Use specific profile from credentials file

--region REGION
    AWS region (e.g., us-east-1)

--output TEXT
    Output format: json|text|table

--query QUERY
    JMESPath query to filter results

--no-paginate
    Disable automatic result pagination

--version
    Show AWS CLI version

--help
    Display help for command

DESCRIPTION

The aws command is the official AWS Command Line Interface (CLI), a unified tool to manage Amazon Web Services from the Linux terminal. It supports over 200 AWS services via subcommands like s3, ec2, and lambda, allowing operations such as uploading files to S3, launching EC2 instances, or querying CloudWatch metrics.

Installation is via pip (pip install awscli) or OS packages. Requires AWS credentials configured through aws configure, environment variables, or IAM roles. Outputs JSON by default, pipeable to jq for formatting.

Key features include auto-completion, interactive shells, and paginators for large result sets. Version 2 offers faster performance and broader OS support. Ideal for scripting, CI/CD pipelines, and automation, reducing reliance on web consoles.

CAVEATS

Requires AWS credentials; high verbosity in scripts; JSON output needs parsing; rate limits apply per service.

CONFIGURATION

Run aws configure to set Access Key ID, Secret Key, default region, and output format.
Profiles in ~/.aws/config and ~/.aws/credentials.

SUBCOMMANDS

Core examples: aws s3 ls (list buckets), aws ec2 describe-instances (list VMs), aws lambda invoke (run functions). Use aws <service> help.

HISTORY

Released by Amazon in 2013 as AWS CLI v1. v2 launched 2019 with Rust rewrite for 10x speed gains, single binary install, and ARM support. Widely adopted for DevOps.

SEE ALSO

jq(1), curl(1)

Copied to clipboard