Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 6418e2d

Browse files
authored
Merge branch 'master' into mention-v2-versions
2 parents ba5215a + a23dc2f commit 6418e2d

File tree

67 files changed

+2114
-1379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2114
-1379
lines changed

Diff for: doc_source/cli-chap-configure.md

+10-115
Original file line numberDiff line numberDiff line change
@@ -6,119 +6,14 @@ This section explains how to configure the settings that the AWS Command Line In
66
AWS requires that all incoming requests are cryptographically signed\. The AWS CLI does this for you\. The "signature" includes a date/time stamp\. Therefore, you must ensure that your computer's date and time are set correctly\. If you don't, and the date/time in the signature is too far off of the date/time recognized by the AWS service, AWS rejects the request\.
77

88
**Topics**
9-
+ [Quickly Configuring the AWS CLI](#cli-quick-configuration)
10-
+ [Creating Multiple Profiles](#cli-quick-configuration-multi-profiles)
11-
+ [Configuration Settings and Precedence](#config-settings-and-precedence)
12-
+ [Configuration and Credential File Settings](cli-configure-files.md)
13-
+ [Named Profiles](cli-configure-profiles.md)
9+
+ [Configuration basics](cli-configure-quickstart.md)
10+
+ [Configuration and credential file settings](cli-configure-files.md)
11+
+ [Named profiles](cli-configure-profiles.md)
1412
+ [Configuring the AWS CLI to use AWS Single Sign\-On](cli-configure-sso.md)
15-
+ [Environment Variables To Configure the AWS CLI](cli-configure-envvars.md)
16-
+ [Command Line Options](cli-configure-options.md)
17-
+ [Sourcing Credentials with an External Process](cli-configure-sourcing-external.md)
18-
+ [Getting Credentials from EC2 Instance Metadata](cli-configure-metadata.md)
19-
+ [Using an HTTP Proxy](cli-configure-proxy.md)
20-
+ [Using an IAM Role in the AWS CLI](cli-configure-role.md)
21-
+ [Command Completion](cli-configure-completion.md)
22-
23-
## Quickly Configuring the AWS CLI<a name="cli-quick-configuration"></a>
24-
25-
For general use, the `aws configure` command is the fastest way to set up your AWS CLI installation\. The following example shows sample values\. Replace them with your own values as described in the following sections\.
26-
27-
```
28-
$ aws configure
29-
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
30-
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
31-
Default region name [None]: us-west-2
32-
Default output format [None]: json
33-
```
34-
35-
When you enter this command, the AWS CLI prompts you for four pieces of information \(access key, secret access key, AWS Region, and output format\)\. These are described in the following sections\. The AWS CLI stores this information in a *profile* \(a collection of settings\) named `default`\. The information in the `default` profile is used any time you run an AWS CLI command that doesn't explicitly specify a profile to use\.
36-
37-
### Access Key and Secret Access Key<a name="cli-quick-configuration-creds"></a>
38-
39-
The `AWS Access Key ID` and `AWS Secret Access Key` are your AWS credentials\. They are associated with an AWS Identity and Access Management \(IAM\) user or role that determines what permissions you have\. For a tutorial on how to create a user with the IAM service, see [Creating Your First IAM Admin User and Group](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html) in the *IAM User Guide*\.
40-
41-
Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS\. If you don't have access keys, you can create them from the AWS Management Console\. As a best practice, do not use the AWS account root user access keys for any task where it's not required\. Instead, [create a new administrator IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html) with access keys for yourself\.
42-
43-
The only time that you can view or download the secret access key is when you create the keys\. You cannot recover them later\. However, you can create new access keys at any time\. You must also have permissions to perform the required IAM actions\. For more information, see [Permissions Required to Access IAM Resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_permissions-required.html) in the *IAM User Guide*\.
44-
45-
**To create access keys for an IAM user**
46-
47-
1. Sign in to the AWS Management Console and open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\.
48-
49-
1. In the navigation pane, choose **Users**\.
50-
51-
1. Choose the name of the user whose access keys you want to create, and then choose the **Security credentials** tab\.
52-
53-
1. In the **Access keys** section, choose **Create access key**\.
54-
55-
1. To view the new access key pair, choose **Show**\. You will not have access to the secret access key again after this dialog box closes\. Your credentials will look something like this:
56-
+ Access key ID: AKIAIOSFODNN7EXAMPLE
57-
+ Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
58-
59-
1. To download the key pair, choose **Download \.csv file**\. Store the keys in a secure location\. You will not have access to the secret access key again after this dialog box closes\.
60-
61-
Keep the keys confidential in order to protect your AWS account and never email them\. Do not share them outside your organization, even if an inquiry appears to come from AWS or Amazon\.com\. No one who legitimately represents Amazon will ever ask you for your secret key\.
62-
63-
1. After you download the `.csv` file, choose **Close**\. When you create an access key, the key pair is active by default, and you can use the pair right away\.
64-
65-
**Related topics**
66-
+ [What Is IAM?](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) in the *IAM User Guide*
67-
+ [AWS Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) in *AWS General Reference*
68-
69-
### Region<a name="cli-quick-configuration-region"></a>
70-
71-
The `Default region name` identifies the AWS Region whose servers you want to send your requests to by default\. This is typically the Region closest to you, but it can be any Region\. For example, you can type `us-west-2` to use US West \(Oregon\)\. This is the Region that all later requests are sent to, unless you specify otherwise in an individual command\.
72-
73-
**Note**
74-
You must specify an AWS Region when using the AWS CLI, either explicitly or by setting a default Region\. For a list of the available Regions, see [Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html)\. The Region designators used by the AWS CLI are the same names that you see in AWS Management Console URLs and service endpoints\.
75-
76-
### Output Format<a name="cli-quick-configuration-format"></a>
77-
78-
The `Default output format` specifies how the results are formatted\. The value can be any of the values in the following list\. If you don't specify an output format, `json` is used as the default\.
79-
+ [**`json`**](cli-usage-output.md#json-output) – The output is formatted as a [JSON](https://json.org/) string\.
80-
+ [**`yaml`**](cli-usage-output.md#yaml-output) – The output is formatted as a [YAML](https://yaml.org/) string\. *\(Available in the AWS CLI version 2 only\.\)*
81-
+ [**`text`**](cli-usage-output.md#text-output) – The output is formatted as multiple lines of tab\-separated string values\. This can be useful to pass the output to a text processor, like `grep`, `sed`, or `awk`\.
82-
+ [**`table`**](cli-usage-output.md#table-output) – The output is formatted as a table using the characters \+\|\- to form the cell borders\. It typically presents the information in a "human\-friendly" format that is much easier to read than the others, but not as programmatically useful\.
83-
84-
## Creating Multiple Profiles<a name="cli-quick-configuration-multi-profiles"></a>
85-
86-
If you use the command shown in the previous section, the result is a single profile named `default`\. You can create additional configurations that you can refer to with a name by specifying the `--profile` option and assigning a name\. The following example creates a profile named `produser`\. You can specify credentials from a completely different account and Region than the other profiles\.
87-
88-
```
89-
$ aws configure --profile produser
90-
AWS Access Key ID [None]: AKIAI44QH8DHBEXAMPLE
91-
AWS Secret Access Key [None]: je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
92-
Default region name [None]: us-east-1
93-
Default output format [None]: text
94-
```
95-
96-
Then, when you run a command, you can omit the `--profile` option and use the credentials and settings stored in the `default` profile\.
97-
98-
```
99-
$ aws s3 ls
100-
```
101-
102-
Or you can specify a `--profile profilename` and use the credentials and settings stored under that name\.
103-
104-
```
105-
$ aws s3 ls --profile produser
106-
```
107-
108-
To update any of your settings, simply run `aws configure` again \(with or without the `--profile` parameter, depending on which profile you want to update\) and enter new values as appropriate\. The next sections contain more information about the files that `aws configure` creates, additional settings, and named profiles\.
109-
110-
## Configuration Settings and Precedence<a name="config-settings-and-precedence"></a>
111-
112-
The AWS CLI uses a set of *credential providers* to look for AWS credentials\. Each credential provider looks for credentials in a different place, such as the system or user environment variables, local AWS configuration files, or explicitly declared on the command line as a parameter\. The AWS CLI looks for credentials and configuration settings by invoking the providers in the following order, stopping when it finds a set of credentials to use:
113-
114-
1. **[Command line options](cli-configure-options.md)** – You can specify `--region`, `--output`, and `--profile` as parameters on the command line\.
115-
116-
1. **[Environment variables](cli-configure-envvars.md)** – You can store values in the environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN`\. If they are present, they are used\.
117-
118-
1. **[CLI credentials file](cli-configure-files.md)** – This is one of the files that is updated when you run the command `aws configure`\. The file is located at `~/.aws/credentials` on Linux or macOS, or at `C:\Users\USERNAME\.aws\credentials` on Windows\. This file can contain the credential details for the `default` profile and any named profiles\.
119-
120-
1. **[CLI configuration file](cli-configure-files.md)** – This is another file that is updated when you run the command `aws configure`\. The file is located at `~/.aws/config` on Linux or macOS, or at `C:\Users\USERNAME\.aws\config` on Windows\. This file contains the configuration settings for the default profile and any named profiles\.
121-
122-
1. **[Container credentials](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)** – You can associate an IAM role with each of your Amazon Elastic Container Service \(Amazon ECS\) task definitions\. Temporary credentials for that role are then available to that task's containers\. For more information, see [IAM Roles for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*\.
123-
124-
1. **[Instance profile credentials](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)** – You can associate an IAM role with each of your Amazon Elastic Compute Cloud \(Amazon EC2\) instances\. Temporary credentials for that role are then available to code running in the instance\. The credentials are delivered through the Amazon EC2 metadata service\. For more information, see [IAM Roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) in the *Amazon EC2 User Guide for Linux Instances* and [Using Instance Profiles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) in the *IAM User Guide*\.
13+
+ [Environment variables to configure the AWS CLI](cli-configure-envvars.md)
14+
+ [Command line options](cli-configure-options.md)
15+
+ [Sourcing credentials with an external process](cli-configure-sourcing-external.md)
16+
+ [Getting credentials from EC2 instance metadata](cli-configure-metadata.md)
17+
+ [Using an HTTP proxy](cli-configure-proxy.md)
18+
+ [Using an IAM role in the AWS CLI](cli-configure-role.md)
19+
+ [Command completion](cli-configure-completion.md)

Diff for: doc_source/cli-chap-install.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
# Installing the AWS CLI<a name="cli-chap-install"></a>
22

3-
The AWS Command Line Interface is available in two versions\.
3+
The AWS Command Line Interface \(AWS CLI\) is available in two versions\.
4+
5+
To check which version you have installed, run the `aws --version`\. The returned value provides the current version you have installed\. The following example shows that the version running is 2\.0\.36\.
6+
7+
```
8+
$ aws --version
9+
aws-cli/2.0.36 Python/3.7.4 Linux/4.14.133-113.105.amzn2.x86_64 botocore/2.0.0
10+
```
411

512
## AWS CLI version 2<a name="cli-chap-install-v2"></a>
613

7-
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 backward compatible with version 1 and you must upgrade to access those features\.
14+
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\.
815

9-
AWS CLI version 2 is available to install only as a bundled installer\. Although you might find it in some package managers, these are not produced or managed by AWS and are therefore not official and not supported by AWS\. We recommend that you install the AWS CLI from only the official AWS distribution points, as documented in this guide\.
16+
The AWS CLI version 2 is available to install only as a bundled installer\. Although you might find it in some package managers, these are not produced or managed by AWS, and therefore are not official packages and not supported by AWS\. We recommend that you install the AWS CLI from only the official AWS distribution points, as documented in this guide\.
1017

11-
For information about how to install AWS CLI version 2, see [Installing the AWS CLI version 2](install-cliv2.md)\.
18+
For more information, see [Installing the AWS CLI version 2](install-cliv2.md)\.
1219

1320
## AWS CLI version 1<a name="cli-chap-install-v1"></a>
1421

15-
AWS CLI version 1 is the original AWS CLI, and we continue to support it\. However, major new features that are introduced in AWS CLI version 2 might not be backported to AWS CLI version 1\. To use those features, you must install AWS CLI version 2\.
22+
The AWS CLI version 1 is the original AWS CLI, and we continue to support it\. However, major new features that are introduced in the AWS CLI version 2 might not be backported to the AWS CLI version 1\. To use those features, you must install the AWS CLI version 2\.
1623

17-
For information about how to install AWS CLI version 1, see [Installing the AWS CLI version 1](install-cliv1.md)\.
24+
For more information, see [Installing the AWS CLI version 1](install-cliv1.md)\.
1825

19-
## Migrating from AWS CLI version 1 to version 2<a name="migrating"></a>
26+
## Migrating from the AWS CLI version 1 to version 2<a name="migrating"></a>
2027

21-
If you ran commands or scripts with AWS CLI version 1 and you are considering migrating to AWS CLI version 2, see [Breaking Changes – Migrating from AWS CLI version 1 to version 2](cliv2-migration.md) for a description of the changes that you should know about\.
28+
If you ran commands or scripts with the AWS CLI version 1 and are considering migrating to the AWS CLI version 2, see [Breaking changes – Migrating from AWS CLI version 1 to version 2](cliv2-migration.md) for a description of changes to be aware of\.

Diff for: doc_source/cli-chap-services.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Using the AWS CLI to Work with AWS Services<a name="cli-chap-services"></a>
1+
# Using the AWS CLI to work with AWS Services<a name="cli-chap-services"></a>
22

33
This section provides examples that show how to use the AWS Command Line Interface \(AWS CLI\) to access various AWS services\.
44

5-
For a complete reference of all the available commands for each service, see the [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/), or use the built\-in command line help\. For more information, see [Getting Help with the AWS CLI](cli-usage-help.md)\.
5+
For a complete reference of all the available commands for each service, see the [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/), or use the built\-in command line help\. For more information, see [Getting help with the AWS CLI](cli-usage-help.md)\.
66

77
**Topics**
88
+ [Using Amazon DynamoDB with the AWS CLI](cli-services-dynamodb.md)

Diff for: doc_source/cli-chap-troubleshooting.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Troubleshooting AWS CLI Errors<a name="cli-chap-troubleshooting"></a>
1+
# Troubleshooting AWS CLI errors<a name="cli-chap-troubleshooting"></a>
22

33
## General: Ensure you're running a recent version of the AWS CLI\.<a name="general-latest"></a>
44

55
If you receive an error that indicates that a command doesn't exist, or that it doesn't recognize a parameter that the documentation says is available, we recommend that the first thing you do \(after checking your command for spelling errors\!\) is to upgrade to the most recent version of the AWS CLI\. Updated versions of the AWS CLI are released almost every business day\. New AWS services, features, and parameters are introduced in those new versions of the AWS CLI\. The only way to get access to those new services, features, or parameters is to upgrade to a version that was released after that element was first introduced\.
66

7-
How you update your version of the AWS CLI depends on how you originally installed it\. For example, if you installed the AWS CLI using `pip`, run `pip install --upgrade`, as described in [Upgrading to the Latest Version of the AWS CLI version 1](install-linux.md#install-linux-awscli-upgrade)\.
7+
How you update your version of the AWS CLI depends on how you originally installed it\. For example, if you installed the AWS CLI using `pip`, run `pip install --upgrade`, as described in [Install and uninstall the AWS CLI version 1 using pip](install-linux.md#install-linux-pip)\.
88

99
If you used one of the bundled installers, you should remove the existing installation and download and install the latest version of the bundled installer for your operating system\.
1010

@@ -137,9 +137,9 @@ This error means that the operating system can't find the AWS CLI program\. The
137137
If you use `pip` to install the AWS CLI, you might need to add the folder that contains the `aws` program to your operating system's `PATH` environment variable, or change its mode to make it executable\.
138138

139139
You might need to add the `aws` executable to your operating system's `PATH` environment variable\. Follow the steps in the appropriate procedure:
140-
+ **Windows**[Add the AWS CLI version 1 Executable to Your Command Line Path](install-windows.md#awscli-install-windows-path)
141-
+ **macOS**[Add the AWS CLI version 1 Executable to Your macOS Command Line Path](install-macos.md#awscli-install-osx-path)
142-
+ **Linux**[Add the AWS CLI version 1 Executable to Your Command Line Path](install-linux.md#install-linux-path)
140+
+ **Windows**[Add the AWS CLI version 1 executable to your command line path](install-windows.md#awscli-install-windows-path)
141+
+ **macOS**[Add the AWS CLI version 1 executable to your macOS command line path](install-macos.md#awscli-install-osx-path)
142+
+ **Linux**[Add the AWS CLI version 1 executable to your command line path](install-linux.md#install-linux-path)
143143

144144
## I get "access denied" errors\.<a name="tshoot-access-denied"></a>
145145

0 commit comments

Comments
 (0)