Step 5: Set up the AWS CLI and AWS SDKs - Amazon Lookout for Vision

Step 5: Set up the AWS CLI and AWS SDKs

The following steps show you how to install the AWS Command Line Interface (AWS CLI) and AWS SDKs. The examples in this documentation use the CLI and SDKs. There are a number of different ways to authenticate AWS SDK calls. The examples in this guide assume that you're using a default credentials profile for calling AWS CLI commands and AWS SDK API operations.

Installing the AWS SDKS

Follow the steps to download and configure the AWS SDKs.

To set up the AWS CLI and the AWS SDKs

  1. Download and install the AWS CLI and the AWS SDKs that you want to use. This guide provides examples for the AWS CLI and Python. For information about installing AWS SDKs, see Tools for Amazon Web Services.

  2. Create an access key for the user you created in Step 2: Create an IAM administrator user and group.

    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. Choose the name of the user you created in Step 2: Create an IAM administrator user and group.

    4. Choose the Security credentials tab.

    5. Choose Create access key, choose Download .csv file to save the access key ID and secret access key to a CSV file on your computer, and then choose Close.

      Important

      Store the file in a secure location. You will not have access to the secret access key again after this dialog box closes.

  3. If you have installed the AWS CLI, you can configure the credentials and Region for most AWS SDKs by entering aws configure at the command prompt. Otherwise, use the following instructions.

  4. On your computer, navigate to your home directory, and create an .aws directory. On Unix-based systems, such as Linux or macOS, this is in the following location:

    ~/.aws

    On Windows, this is in the following location:

    %HOMEPATH%\.aws
  5. In the .aws directory, create a new file named credentials.

  6. Open the credentials CSV file that you created in step 2. Copy its contents into the credentials file using the following format:

    [default] aws_access_key_id = your_access_key_id aws_secret_access_key = your_secret_access_key

    Substitute your access key ID and secret access key for your_access_key_id and your_secret_access_key.

  7. Save the Credentials file and delete the CSV file.

  8. In the .aws directory, create a new file named config.

  9. Open the config file and enter your Region in the following format.

    [default] region = your_aws_region

    Substitute your Region (for example, us-west-2) for your_aws_region.

    Note

    If you don't select a Region, us-east-1 is used by default.

  10. Save the config file.