Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
Created February 23, 2021 12:29
Show Gist options
  • Save ruanbekker/9cce7b88fb3076c5e15ba00a1fd0651c to your computer and use it in GitHub Desktop.
Save ruanbekker/9cce7b88fb3076c5e15ba00a1fd0651c to your computer and use it in GitHub Desktop.
Install AWS CLI Version 2 on Ubuntu 20
$ apt update
$ apt search awscli
$ apt install curl wget unzip -y
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ ./aws/install
$ aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/4.19.121-linuxkit exe/x86_64.ubuntu.20 prompt/off

For ecr-login:

$ export AWS_PAGER=
$ export AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials
$ aws --profile dev ecr get-login-password | docker login --username AWS --password-stdin ${accountid}.dkr.ecr.${region}.amazonaws.com
@bmamatkadyr
Copy link

Thank u 🔥

@ha-bib
Copy link

ha-bib commented Jul 18, 2024

wow

@iurisman
Copy link

Works, thank you. But whatever the heck happened to apt install awscli?

@ehmad11
Copy link

ehmad11 commented Oct 7, 2024

i had to add another command

sudo ln -sf /usr/local/bin/aws /usr/bin/aws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment