AWS CLI Cheatsheet

This page contains a cheat sheet with useful AWS commands

AWSCLI

How to install:

# Arch Linux:
sudo pacman -S awscli

# Redhat based or Debian based:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Or install via PIP

pip3 install awscli --upgrade --user

Resources:

How to remove:

sudo rm -rf /usr/local/aws
sudo rm /usr/local/bin/aws

Check awscli version:

Configure cloud access

  • Add key

  • Add Secret Key

  • Add Region

  • Add Format

The above values can be obtained by using programmatic access (Access keys) via IAM Service

S3 commands

How to check Total S3 bucket size:

Lightsail commands

Restart Instance:

Stop Instance:

Start Instance:

Last updated