Amazon Textract
Developer Guide

Step 2: 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 that the examples in this documentation use.

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.

For a list of available AWS Regions, see Regions and Endpoints in the Amazon Web Services General Reference.

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, Java, and Python. For information about other AWS SDKs, see Tools for Amazon Web Services.

  2. Create an access key for the user that you created in Create 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. Choose the name of the user that you created in Create an IAM User.

    4. Choose the Security credentials tab.

    5. Choose Create access key. Then choose Download .csv file to save the access key ID and secret access key to a CSV file on your computer. Store the file in a secure location. You will not have access to the secret access key again after this dialog box closes. After you've downloaded the CSV file, choose Close.

  3. Set credentials in the AWS credentials profile file on your local system, located at:

    • ~/.aws/credentials on Linux, macOS, or Unix.

    • C:\Users\USERNAME\.aws\credentials on Windows.

    This file should contain lines in 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.

  4. Set the default AWS Region in the AWS config file on your local system, located at:

    • ~/.aws/config on Linux, macOS, or Unix.

    • C:\Users\USERNAME\.aws\config on Windows.

    This file should contain the following lines:

    [default] region = your_aws_region

    Substitute the AWS Region you want (for example, "us-west-2") for your_aws_region.

    Note

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

Next Step

Step 3: Get Started Using the AWS CLI and AWS SDK API

On this page: