AWS Command Line Interface (CLI) tools allow you to manage your AWS services from the command line. For it to work, you'll need to have an IAM user with appropriate permission configured for programmatic access and configure the AWS CLI tools on your machines.
The following configuration method of AWS CLI is applicable for all the platforms such as Windows, Linux, or any other UNIX-based operating systems, including macOS. It creates a single profile named default by default, though you can also configure it for multiple profiles or accounts.
Related: How to install AWS CLI tools on Ubuntu \\Related: How to install AWS CLI tools on CentOS, Red Hat or Fedora \\Related: How to install AWS CLI on Windows \\Related: How to install AWS CLI tools using pip \\Related: How to configure multiple profiles for AWS CLI
$ aws configure
AWS Access Key ID [None]: AKIAJ3TE4LUDC4I6SQDQ
AWS Secret Access Key [None]: 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
Default region name [None]:
You could leave the field blank. The list of available regions are available in AWS online documentation.
Related: AWS Regions and Endpoints
Default output format [None]:
You could leave the field blank. Default value is json but you can also set it to text or table.
$ ls .aws/ config credentials
$ cat .aws/credentials [default] aws_access_key_id = AKIAJ3TE4LUDC4I6SQDQ aws_secret_access_key = Ibt05WpUQ33Wqkig8HijqDeZd0wyr+hHJoQy/RMz
$ cat .aws/config [default]
You could manually add the configuration later in the following format:
default_region_name=your_preferred_region default_output_format=your_preferred_format
$ aws s3 ls 2018-12-29 13:58:51 simplified-guide
Comment anonymously. Login not required.