Installing aws-cli on Arch Linux

You can either install aws-cli from the official repository….

$ sudo pacman -Sy aws-cli

…or aws-cli-git from the AUR.

$ yaourt -Sy aws-cli-git

To configure, you’ll need to create a public and private access key. For testing purposes, I created a new one for the root user. Once you have this to hand, run:

[andy@home-pc ~]$ aws configure
AWS Secret Access Key [None]: AcbQW4syws9bL5mVCWqAwys1TpC3BIlZeEQXi+7j
Default region name [None]: eu-west-2
Default output format [None]: json

You can test that worked with:

[andy@home-pc ~]$ aws sts get-caller-identity
    "UserId": "902857267385,
    "Account": "902857267385",
    "Arn": "arn:aws:iam::902857267385:root"


[andy@home-pc ~]$ aws iam get-user
    "User": {
        "UserId": "902857267385",
        "Arn": "arn:aws:iam::902857267385:root",
        "CreateDate": "2017-07-07T15:28:59Z",
        "PasswordLastUsed": "2019-01-27T16:56:57Z"

If you followed along – you are a BAD HUMAN! You must now go and create and use an IAM user instead and then delete this root key!

Be the first to comment

Leave a Reply