Menu
Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)

Set Up the AWS CLI

Follow the steps to download and configure AWS Command Line Interface (AWS CLI).

Note

Services in AWS, such as Amazon S3, require that you provide credentials when you access them, so that the service can determine whether you have permissions to access the resources owned by that service. The console requires your password. You can create access keys for your AWS account to access the AWS CLI or API. However, we don't recommend that you access AWS using the credentials for your AWS account. Instead, we recommend that you use AWS Identity and Access Management (IAM). Create an IAM user, add the user to an IAM group with administrative permissions, and then grant administrative permissions to the IAM user that you created. You can then access AWS using a special URL and that IAM user's credentials. For instructions, go to Creating Your First IAM User and Administrators Group in the IAM User Guide.

To set up the AWS CLI

  1. Download and configure the AWS CLI. For instructions, see the following topics in the AWS Command Line Interface User Guide.

  2. Add a named profile for the administrator user in the AWS CLI config file. You use this profile when executing the AWS CLI commands.

    Copy
    [adminuser] aws_access_key_id = adminuser access key ID aws_secret_access_key = adminuser secret access key region = aws-region
    For a list of available AWS regions, see Regions and Endpoints in the AWS General Reference.

  3. Verify the setup by entering the following commands at the command prompt.

    • Try the help command to verify that the AWS CLI is installed on your computer:

      Copy
      aws help

    • Try an S3 command to verify the user can reach Amazon S3. This command lists buckets in your account. The AWS CLI uses the adminuser credentials to authenticate the request.

      Copy
      aws s3 ls --profile adminuser