DEV Community

JPL
JPL

Posted on • Updated on

Install the AWS CLI v2

To update your current installation of AWS CLI, download a new installer each time you update to overwrite previous versions.

    curl "https://awscli.amazonaws.com/awscli-exe-linux- 
    x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
Enter fullscreen mode Exit fullscreen mode

curl-cli-v2

To update your current installation of the AWS CLI, add your existing symlink and installer information to construct the install command with the --update parameter.

   sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
Enter fullscreen mode Exit fullscreen mode

UNZIP INSTALLER

    unzip awscliv2.zip
Enter fullscreen mode Exit fullscreen mode

unzip-cli

RUN THE INSTALL PROGRAM

Run the install program. The installation command uses a file named install in the newly unzipped aws directory. By default, the files are all installed to /usr/local/aws-cli, and a symbolic link is created in /usr/local/bin. The command includes sudo to grant write permissions to those directories.

    sudo ./aws/install
Enter fullscreen mode Exit fullscreen mode

CONFIRM INSTALLATION

    aws --version
Enter fullscreen mode Exit fullscreen mode

sudo-aws-version-cli

How to check does user have configured profile on laptop?

   aws configure list-profiles
Enter fullscreen mode Exit fullscreen mode

If you don't have it, then you need to setup using command aws configure.

TESTING configuration:

 aws s3 ls 
Enter fullscreen mode Exit fullscreen mode

If you get list of your buckets, then your CLI is configured correctly.

Source for install CLI v2 : AWS Documentation

Source for check the profiles and setup more profiles on AWS Documentation

Top comments (0)