Install and configure AWS command line interface
While deploying Access Gateway into an Amazon Web Services environment, you can use the Command Line Interface (CLI) to do numerous tasks. Command line interface commands are often easier, script-able, and often support tasks not supported in the AWS console.
During this task we will install and configure the AWS command line interface.
Before you begin
Ensure that you have:
- An AWS account
- Access to a supported command line environment such as Windows, Linux or Apple OSX.
Install the AWS command line interface
You can install the command line interface in a variety of environments.
The AWS CLI install process is governed by Amazon and may change. This page is meant as a guide. Consult the AWS documentation for details about the command line interface and similar topics.
- Navigate to the AWS CLI overview page.
- Scroll to the install/update section and follow the instructions for your environment.
For example, for MacOS:Copy
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
For example, for Windows:Copy
Windows command line
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
- Follow the instructions to configure your AWS command line instance.
aws configure AWS Access Key ID [None]: A. . . EXAMPLE AWS Secret Access Key [None]: wJ. . . EXAMPLEKEY Default region name [None]: us-east-2 Default output format [None]: json
See the following two sub-sections for details of determining your AWS AccessKeyID, Secrete Access Key, and region.
To determine your Access Key ID and associated key
- Open the IAM console at https://console.aws.amazon.com/iam/.
- In the navigation pane select Users.
- Click the name of the user requiring CLI access.
- Select the Security credentials tab.
- Click Create access key.
The Create access key dialog will display. Click Show to display the secret access key.
- Use the provided values when configuring CLI access.
See the Amazon Web Services Configuration basics page for more information.
To determine your region
- Open a browser to https://signin.aws.amazon.com/
- Sign in to the AWS Console.
- Examine the default region as shown to the right of account information.
See Regions and Availability Zones in the Amazon Web Services documentation for more information on AWS regions and availability zones.