Install AWS CLI

I’m using pip to install the latest awscli as the version in apt won’t work for the new ‘Deep Archive’ however awscli v2 is now available and should be used instead of the old one: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html

pip3 install awscli

Now we need to configure the cli by installing authentication from AWS. Log into the AWS account and go to IAM. Click on Users, then your name, and then Create access key as shown below. Save the file as you won’t be able to get it again and will have to create a new one.

Now add the keys using the default region: eu-west-1

aws configure --profile xyze

To use the xyze profile for the whole of your current terminal session:

export AWS_PROFILE=xyze

Leave a comment