The everyday AWS CLI and Google Cloud commands — credentials, storage, instances and deploys. Tap to copy.
aws configureSet up credentials and default regionaws sts get-caller-identityShow which identity you're usingaws s3 lsList your S3 bucketsaws s3 cp file.txt s3://bucket/Upload a file to S3aws s3 sync . s3://bucket/Sync a folder up to S3aws ec2 describe-instancesList your EC2 instancesaws logs tail /aws/lambda/fn --followStream a Lambda's logsgcloud initSet up the gcloud CLI interactivelygcloud auth loginAuthenticate with your Google accountgcloud config set project my-projectSet the active projectgcloud projects listList your projectsgcloud compute instances listList Compute Engine VMsgcloud app deployDeploy an App Engine appgsutil lsList Cloud Storage bucketsgsutil cp file.txt gs://bucket/Upload a file to a bucketgsutil -m rsync -r . gs://bucket/Sync a folder to a bucket (parallel)The AWS and Google Cloud command-line tools let you manage cloud resources without leaving the terminal. Both start the same way: authenticate and set defaults with aws configure or gcloud init. From there the patterns rhyme — list resources, copy files to object storage (aws s3 cp / gsutil cp), inspect compute instances, and deploy. This cheatsheet keeps the most common commands from each side by side.
Object storage is where most people start: aws s3 sync and gsutil rsync mirror a local folder up to a bucket, which is handy for static sites, backups and build artifacts. Checking your identity (aws sts get-caller-identity) is the first thing to run when a command fails with a permissions error — it confirms which account and role you're actually using. These pair naturally with the Docker and kubectl commands when you deploy containers.