

# What is the AWS Command Line Interface?
About the AWS CLI

The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. With minimal configuration, the AWS CLI enables you to start running commands that implement functionality equivalent to that provided by the browser-based AWS Management Console from the command prompt in your terminal program:
+ **Linux shells** – Use common shell programs such as [https://www.gnu.org/software/bash/](https://www.gnu.org/software/bash/), [http://www.zsh.org/](http://www.zsh.org/), and [https://www.tcsh.org/](https://www.tcsh.org/) to run commands in Linux or macOS.
+ **Windows command line** – On Windows, run commands at the Windows command prompt or in PowerShell.
+ **Remotely** – Run commands on Amazon Elastic Compute Cloud (Amazon EC2) instances through a remote terminal program such as PuTTY or SSH, or with AWS Systems Manager.

All IaaS (infrastructure as a service) AWS administration, management, and access functions in the AWS Management Console are available in the AWS API and AWS CLI. New AWS IaaS features and services provide full AWS Management Console functionality through the API and CLI at launch or within 180 days of launch. 

The AWS CLI provides direct access to the public APIs of AWS services. You can explore a service's capabilities with the AWS CLI, and develop shell scripts to manage your resources. In addition to the low-level, API-equivalent commands, several AWS services provide customizations for the AWS CLI. Customizations can include higher-level commands that simplify using a service with a complex API.

## About AWS CLI version 2


The AWS CLI version 2 is the most recent major version of the AWS CLI and supports all of the latest features. Some features introduced in version 2 are not backported to version 1 and you must upgrade to access those features. There are some "breaking" changes from version 1 that might require you to change your scripts. For a list of breaking changes in version 2, see [Migration guide for the AWS CLI version 2](cliv2-migration.md).

The AWS CLI version 2 is available to install only as a bundled installer. While you might find it in package managers, these are unsupported and unofficial packages that are not produced or managed by AWS. We recommend that you install the AWS CLI from only the official AWS distribution points, as documented in this guide. 

To install the AWS CLI version 2, see [Installing or updating to the latest version of the AWS CLI](getting-started-install.md).

To check the currently installed version, use the following command:

```
$ aws --version
aws-cli/2.27.41 Python/3.11.6 Linux/5.10.205-195.807.amzn2.x86_64 botocore/1.18.6
```

For version history, see the [AWS CLI version 2 Changelog](https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst) on *GitHub*.

## Maintenance and support for SDK major versions


For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the [AWS SDKs and Tools Reference Guide](https://docs.aws.amazon.com/sdkref/latest/guide/overview.html):
+ [AWS SDKs and tools maintenance policy](https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html)
+ [AWS SDKs and tools version support matrix](https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html)

## About Amazon Web Services


Amazon Web Services (AWS) is a collection of digital infrastructure services that developers can leverage when developing their applications. The services include computing, storage, database, and application synchronization (messaging and queuing). AWS uses a pay-as-you-go service model. You are charged only for the services that you—or your applications—use. Also, to make AWS more approachable as a platform for prototyping and experimentation, AWS offers a free usage tier. On this tier, services are free below a certain level of usage. For more information about AWS costs and the Free Tier, see [AWS Free Tier](https://aws.amazon.com/free/). To obtain an AWS account, open the [AWS home page](https://aws.amazon.com/) and then choose **Create an AWS Account**.

# About the examples in the AWS CLI User Guide
About the examples

The AWS Command Line Interface (AWS CLI) examples in this guide are formatted using the following conventions:
+ **Prompt** – The command prompt uses the Linux prompt and is displayed as (`$ `). For commands that are Windows specific, `C:\>` is used as the prompt. Do not include the prompt when you type commands. 
+ **Directory** – When commands must be executed from a specific directory, the directory name is shown before the prompt symbol.
+ **User input** – Command text that you enter at the command line is formatted as **user input**.
+ **Replaceable text** – Variable text, including names of resources that you choose, or IDs generated by AWS services that you must include in commands, is formatted as *replaceable text*. In multiple-line commands or commands where specific keyboard input is required, keyboard commands can also be shown as replaceable text.
+ **Output** – Output returned by AWS services is shown under user input, and is formatted as `computer output`.

The following **aws configure** command example demonstrates user input, replaceable text, and output:

1. Enter **aws configure** at the command line, and then press **Enter**.

1. The AWS CLI outputs lines of text, prompting you to enter additional information.

1. Enter each of your access keys in turn, and then press **Enter**.

1. Then, enter an AWS Region name in the format shown, press **Enter**, and then press **Enter** a final time to skip the output format setting.

1. The final **Enter** command is shown as replaceable text because there is no user input for that line.

   ```
   $ aws configure
   AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
   AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
   Default region name [None]: us-west-2
   Default output format [None]: ENTER
   ```

The following example shows a simple command with output. To use this example, enter the full text of the command (the highlighted text after the prompt), and then press **Enter**. The name of the security group, *`my-sg`*, is replaceable to your desired security group name. The JSON document, including the curly braces, is output. If you configure your CLI to output in text or table format, the output will be formatted differently. [JSON](https://json.org) is the default output format.

```
$ aws ec2 create-security-group --group-name my-sg --description "My security group"
{
    "GroupId": "sg-903004f8"
}
```

# Additional documentation and resources for the AWS CLI
Additional documentation and resources

## AWS CLI documentation and resources


In addition to this user guide, the following are valuable online resources when you use the AWS CLI.
+ [AWS CLI version 2 reference guide](https://docs.aws.amazon.com/cli/latest/reference/index.html)
+ [AWS CLI Bash scripting code examples repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/aws-cli). Open source bash scripting examples. Bash scripting examples are hosted in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples) on *GitHub*.
+ [AWS CLI GitHub repository](https://github.com/aws/aws-cli). You can view and fork the source code for the AWS CLI on *GitHub*. Join the community of users on *GitHub* to provide feedback, request features, and submit your own contributions. This includes viewing and providing commands examples for the AWS CLI documentation.
+ [AWS CLI alias examples repository](https://github.com/awslabs/awscli-aliases) You can view and fork AWS CLI alias examples on *GitHub*.
+ <a name="latest-guide"></a>[AWS CLI version 2 Changelog](https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst?plain=1)

## Other AWS SDKs and tools


Depending on your use case, you might want to choose one of the AWS SDKs or tools to better fit your needs:
+ [AWS SDKs and Tools Reference Guide](https://docs.aws.amazon.com/sdkref/latest/guide/)
+ [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/sdk-for-cpp)
+ [AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/)
+ [AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/)
+ [AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/latest/developer-guide/)
+ [AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin)
+ [AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/)
+ [AWS SDK for Python (Boto)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
+ [AWS SDK for PHP](https://docs.aws.amazon.com/sdk-for-php/latest/developer-guide/)
+ [AWS Tools for PowerShell](https://docs.aws.amazon.com/powershell/latest/userguide/)
+ [AWS SDK for Ruby](https://docs.aws.amazon.com/sdk-for-ruby/latest/developer-guide/)
+ [AWS SDK for Rust](https://docs.aws.amazon.com/sdk-for-rust)
+ [AWS SDK for SAP ABAP](https://docs.aws.amazon.com/sdk-for-sapabap)
+ [AWS SDK for Swift](https://docs.aws.amazon.com/sdk-for-swift)
+ [AWS Amplify](https://docs.amplify.aws/swift/)