~/CloudSetup.In

AWS CLI

Cloud CLI credentials ● stable

Command-line control of every AWS service from one unified client.

01 Overview

The AWS CLI wraps the AWS API in a consistent set of commands so you can manage EC2, S3, IAM, and virtually every other service from scripts or a terminal, using the same credentials and profiles your infra-as-code tools read from.

→ official documentation

02 Installation

Pick a platform. Each step is copy-pasteable on its own.

01  Download the installer
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
02  Unzip it
sudo apt-get install -y unzip
unzip awscliv2.zip
03  Run the installer
sudo ./aws/install
04  Verify
aws --version
01  Download the installer
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
02  Unzip it
sudo dnf install -y unzip
unzip awscliv2.zip
03  Run the installer
sudo ./aws/install
04  Verify
aws --version
01  Install via Homebrew
brew install awscli
02  Verify
aws --version
Note — commands assume sudo privileges and an up-to-date package index. Pin a specific version in production rather than tracking latest.

03 Install script

The steps above bundled into a single idempotent shell script for provisioning boxes unattended.

install-aws-cli.sh
Ubuntu/Debian target · safe to re-run · exits non-zero on failure
↓ download script

04 Cheatsheet

The commands reached for most often once AWS CLI is installed.

CommandWhat it does
aws configureSet access key, secret, region, and output format
aws sts get-caller-identityConfirm which identity/account you're using
aws s3 lsList S3 buckets
aws s3 sync ./dir s3://bucket/pathSync a local directory to S3
aws ec2 describe-instancesList EC2 instances and their state
aws --profile name <cmd>Run a command against a named profile
aws logs tail /log/group --followStream CloudWatch logs