Amazon Web Services Command Line Interface

Amazon Web Services Command Line Interface

 

The AWS CLI is an open source tool built on top of the AWS SDK for Python (Boto) that provides commands for interacting with AWS services. With minimal configuration, you can start using all of the functionality provided by the AWS Management Console from your favorite terminal program.

    Linux shells – Use common shell programs such as Bash, Zsh, and tsch to run commands in Linux, macOS, or Unix.

    Windows command line – On Microsoft Windows, run commands in either PowerShell or the Windows Command Processor.

    Remotely – Run commands on Amazon EC2 instances through a remote terminal such as PuTTY or SSH, or with Amazon EC2 systems manager.

The AWS CLI provides direct access to AWS services' public APIs. Explore a service's capabilities with the AWS CLI, and develop shell scripts to manage your resources. Or take what you've learned to develop programs in other languages with the AWS SDK.

In addition to the low level, API equivalent commands, the AWS CLI also provides customizations for several services. Customizations are higher level commands that simplify using a service with a complex API. For example, the aws s3 set of commands provide a familiar syntax for managing files in Amazon S3.

Example Upload a file to Amazon S3

aws s3 cp provides a shell-like copy command, and automatically performs a multipart upload to transfer large files quickly and resiliently.
 

~$ aws s3 cp myvideo.mp4 s3://mybucket/

Performing the same task with the low level commands (available under aws s3api) would take a lot more effort.

Depending on your use case, you may want to use the AWS SDK, a toolkit, or the AWS Tools for Windows PowerShell.
Synopsis

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

Use aws command help for information on a specific command. Use aws help topics to view a list of available help topics. The synopsis for each command shows its parameters and their usage. Optional parameters are shown in square brackets.
Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command's default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination.

--output (string)

The formatting style for command output.

    json
    text
    table

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

    on
    off
    auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout.
Available Services

    acm
    acm-pca
    alexaforbusiness
    apigateway
    application-autoscaling
    appstream
    appsync
    athena
    autoscaling
    autoscaling-plans
    batch
    budgets
    ce
    cloud9
    clouddirectory
    cloudformation
    cloudfront
    cloudhsm
    cloudhsmv2
    cloudsearch
    cloudsearchdomain
    cloudtrail
    cloudwatch
    codebuild
    codecommit
    codepipeline
    codestar
    cognito-identity
    cognito-idp
    cognito-sync
    comprehend
    configservice
    configure
    connect
    cur
    datapipeline
    dax
    deploy
    devicefarm
    directconnect
    discovery
    dlm
    dms
    ds
    dynamodb
    dynamodbstreams
    ec2
    ecr
    ecs
    efs
    eks
    elasticache
    elasticbeanstalk
    elastictranscoder
    elb
    elbv2
    emr
    es
    events
    firehose
    fms
    gamelift
    glacier
    glue
    greengrass
    guardduty
    health
    history
    iam
    importexport
    inspector
    iot
    iot-data
    iot-jobs-data
    iot1click-devices
    iot1click-projects
    iotanalytics
    kinesis
    kinesis-video-archived-media
    kinesis-video-media
    kinesisanalytics
    kinesisvideo
    kms
    lambda
    lex-models
    lex-runtime
    lightsail
    logs
    machinelearning
    macie
    marketplace-entitlement
    marketplacecommerceanalytics
    mediaconvert
    medialive
    mediapackage
    mediastore
    mediastore-data
    mediatailor
    meteringmarketplace
    mgh
    mobile
    mq
    mturk
    neptune
    opsworks
    opsworks-cm
    organizations
    pi
    pinpoint
    polly
    pricing
    rds
    redshift
    rekognition
    resource-groups
    resourcegroupstaggingapi
    route53
    route53domains
    s3
    s3api
    sagemaker
    sagemaker-runtime
    sdb
    secretsmanager
    serverlessrepo
    servicecatalog
    servicediscovery
    ses
    shield
    signer
    sms
    snowball
    sns
    sqs
    ssm
    stepfunctions
    storagegateway
    sts
    support
    swf
    transcribe
    translate
    waf
    waf-regional
    workdocs
    workmail
    workspaces
    xray

These commands will take you to the appropriate article at Amazon.