How to setup aws-cli

You need to install the aws-cli in your system. You can click here to install the aws-cli for your desired operating system. To confirm, the successful installation, open your command line and execute the command below:

D:\> aws --version //you should be able to see the version installed

In case you are unable to execute the command, please close and reopen the command line and try again. If you are still unable to see the version, you might need to add the installation path to your environment variable. Click here to add path to your environment variable.

Now let’s setup the basic configuration for our local aws-cli. You need to have following values before you can do basic configuration.

  • Access Key ID
  • Secret Access Key
  • AWS Region
  • Output format

Output format can be from one of the following – JSON, yaml, table, text, yaml-stream
You can generate your Access Key ID and Secret Access Key by going into AWS console and following the steps:

  1. From the navigation panel, go to Users
  2. Select the user for whom you want to generate the credentials then select the Security credentials tab.
  3. In the Access keys menu, select to Create access key.

You can now finish setting up your aws-cli using the command:

D:\> aws configure //This will prompt you to setup the above mentioned key
AWS Secret Access Key [None]:YOUR_ACCESS_KEY
Default region name [None]: YOUR_AWS_REGION
Default output format [None]: YOUR_OUTPUT_FORMAT

I hope this post was helpful to you. If you like my post, follow me @twitter/andramazo.

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top