Set Up the AWS CLI
Follow the steps to download and configure AWS Command Line Interface (AWS CLI).
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
Download and configure the AWS CLI. For instructions, see the following topics in the AWS Command Line Interface User Guide.
Add a named profile for the administrator user in the AWS CLI config file. You use this profile when executing the AWS CLI commands.
For a list of available AWS regions, see Regions and Endpoints in the AWS General Reference.Copy
[adminuser] aws_access_key_id =
adminuser access key IDaws_secret_access_key =
adminuser secret access keyregion =
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
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