skip to Main Content

when we install awscli on linux box ?
Installation Amazon Command line interface tool to interact with AWS Services:
AWS Cli is used to access resources like EC2, S3 Bucket and other aws services:

This command is for Linux batch

installed awscli
apt install awscli

2

Answers


  1. Chosen as BEST ANSWER

    Install awsclie and configure awscli , then it will create .aws directory. .aws directory has two files config and credentails.

    1).Install AWS CLI commands:

                 apt update -y
                 apt install awscli -y
    

    Check version:

               aws --v
               aws-cli/1.22.34 Python/3.10.6 Linux/5.19.0-1025-aws 
               botocore/1.23.34
    
    1. Configure aws cli: provide access key and secret key Check .aws directory :

           root@ip-xxxxxxxxxxx:~# aws configure
           AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxxxxxx
           AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
           Default region name [None]:
           Default output format [None]:
      

    3). Check .aws directory (aws is a hidden directory start with .)

               root@ip-172-31-15-200:~# ls -alrt
               total 28
               -rw-r--r--  1 root root  161 Jul  9  2019 .profile
               -rw-r--r--  1 root root 3106 Oct 15  2021 .bashrc
               drwxr-xr-x 19 root root 4096 Oct 18 06:45 ..
               drwx------  2 root root 4096 Oct 18 06:45 .ssh
               drwx------  4 root root 4096 Oct 18 06:45 snap
               drwxr-xr-x  2 root root 4096 Oct 18 06:54 .aws
               drwx------  5 root root 4096 Oct 18 06:54 .
    

  2. The ~/.aws directory is created when you run the aws configure command to store your credentials.

    For example:

    $ aws configure
    AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
    AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    Default region name [None]: us-west-2
    Default output format [None]: json
    

    See: Configuration and credential file settings – AWS Command Line Interface

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search