From 4e3bf50c9e3eb593d78fc50299e773b117a8d856 Mon Sep 17 00:00:00 2001 From: terminalforlife Date: Tue, 10 Mar 2020 17:36:31 +0000 Subject: [PATCH] Tweak and/or add to aws --- sheets/aws | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/sheets/aws b/sheets/aws index 6bd32dd..2114569 100644 --- a/sheets/aws +++ b/sheets/aws @@ -1,38 +1,43 @@ -# install aws cli +# aws +# ??? + +# Install AWS CLI, using a Python package installer. This is available in the +# Ubuntu 16.04 repositories, so is probably available in other distributions' +# repositories, therefore I'd recommend using that unless otherwise required. pip install awscli -# configure AWS CLI +# Configure AWS CLI. aws configure -# describe instances in the current account +# Describe instances in the current account. aws ec2 describe-instances --instance-ids i-01234567 -# list public IP addresses of instances +# List public IP addresses of instances. aws ec2 describe-instances \ --query "Reservations[*].Instances[*].PublicIpAddress" \ --output=text -# start instance with the specified id +# Start instance with the specified ID. aws ec2 start-instances --instance-ids i-12345678c -# copy directory to S3 +# Copy directory to S3. aws s3 cp ${directory} s3://${bucket}/${directory} --recursive -# sync directory with S3 +# Sync directory with S3. aws s3 sync ${directory} s3://${bucket}/${directory} --exclude *.tmp -# list s3 buckets +# List S3 buckets. aws s3 ls -# remove s3 bucket +# Remove S3 bucket. aws s3 rb --force s3://${bucket_name} -# get bucket logging +# Get bucket logging. aws s3api get-bucket-logging --bucket ${bucket_name} -# AWS cloudformation list stacks +# AWS cloudformation list stacks. aws cloudformation list-stacks \ --stack-status-filter [ CREATE_COMPLETE | UPDATE_COMPLETE | etc.. ] -# other useful commands: +# Follow the below link for some other useful commands. # https://github.com/toddm92/aws/wiki/AWS-CLI-Cheat-Sheet