Contact Us

AWS Command Line Interface

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts

AWS Command Line Interface

The AWS Command Line Interface (AWS CLI) is an open-source tool that enables you to interact with Amazon Web Services using commands in your command-line shell.


The AWS CLI is available in two versions:


Version 2.x – The current, generally available release of the AWS CLI is intended for use in production environments. This version does include some "breaking" changes from version 1 that might require you to change your scripts so that they continue to operate as you expect.


Version 1.x – The previous version of the AWS CLI is available for backward compatibility.


Linux shells – We can use common shell programs such as bash, zsh, and tcsh to run commands in Linux or macOS.


Windows command line – On Windows, we can 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.


The AWS CLI provides access to the public APIs of AWS services. You can check the service's capabilities with the AWS CLI, and develop shell scripts to manage your resources.


Several AWS services give you customizations for the AWS CLI. Customizations can include higher-level commands and this simplifies using a service with a complex API. We can have a look on the aws s3 commands provide a familiar syntax for managing files in Amazon Simple Storage Service (Amazon S3).



Example Upload a file to Amazon S3


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


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



Windows MSI installer version for  AWS CLI version 1. The Windows MSI installer for AWS CLI version 1 includes and uses its own embedded copy of Python, independent of any other Python version that you might have installed. 


Quickly Configuring the AWS CLI

For normal use, the aws configure command is the fastest way to set up your AWS CLI installation below example shows sample values. Replace them with our own values as described below



$ 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]: json


Access Key and Secret Access Key

The AWS Access Key ID and AWS Secret Access Key are your important and this is our AWS credentials. This is associated with an AWS Identity and Access Management (IAM) user or role that determines the permissions you have. For more on how to create a user with the IAM service, see Creating Your First IAM Admin User and Group in the IAM User Guide.

Keys consist of an access key ID and secret access key, which will be used to sign programmatic requests that you make to AWS. You cannot recover them later. You must also have permission to perform the required IAM actions. For more details on how Permissions Required to Access IAM Resources in the IAM User Guide.

To create access keys for an IAM user

  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.

  2. In the navigation pane, choose Users.

  3. Give a name to the user whose access keys you want to create, and then choose the Security credentials tab.

  4. In the Access keys option  choose to Create access key.

  5. To get the new access key pair, choose Shows. Your credentials will look something like this:

    • Access key ID: AKIAIOSFODNN7EXAMPLE

    • Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

To download the pair, navigate to Download .csv file. Store the keys in a secure location. Keep the keys confidential secret do not share this. After you download the .csv file, choose Close.