Installing aws-cli on Ubuntu 18.04 LTS

There are a number of ways to install the AWS command line tools. Below is the method I favour on Ubuntu 18.04 LTS:

[[email protected] ~]$ sudo apt install awscli

Check that was successful with:

[[email protected] ~]$ aws --version
aws-cli/1.14.44 Python/3.6.7 Linux/4.15.0-50-generic botocore/1.8.48

Configure aws-cli to use your AWS credentials:

[[email protected] ~]$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: eu-west-1
Default output format [None]: json

You can test your AWS credentials with the below command.

[[email protected] ~]$ aws sts get-caller-identity
{
    "Account": "903503371367", 
    "UserId": "AKIAIOSFODNN7EXAMPLE", 
    "Arn": "arn:aws:iam::903503371367:user/andy"
}

It should display your users details if you are authenticated.

Be the first to comment

Leave a Reply