Skip to content

Instantly share code, notes, and snippets.

@tylernchls
Last active December 6, 2017 20:50
Show Gist options
  • Save tylernchls/e11323ce0e5ec4aef48562dd1bcee849 to your computer and use it in GitHub Desktop.
Save tylernchls/e11323ce0e5ec4aef48562dd1bcee849 to your computer and use it in GitHub Desktop.

Create Bucket

aws s3api create-bucket --bucket website-bucket-name --region us-west-2 --acl public-read --create-bucket-configuration LocationConstraint=us-west- 2

Make Bucket A Static Website

aws s3 website s3://website-bucket-name/ --index-document index.html --error-document error.html

Sync Local Project Directory to Static Website Bucket

aws s3 sync projectfolder s3://bucket-name --acl public-read

Copy files/images and load to s3 bucket and makes public viewing

aws s3 cp ~/itemlocation s3://bucket name/ --acl public-read --profile

List all s3 Buckets

aws s3api list-buckets --profile whs

Delete Bucket

aws s3api delete-bucket --bucket bucket name

Create Postgres DB instance

aws rds create-db-instance --db-instance-identifier identifier --db-name dbname --allocated-storage 20 --db-instance-class db.t2.micro --engine postgres --master-username username --master-user-password password --port 5432 --availability-zone us-west-2a

List DB instances

aws rds describe-db-instances

Connect to Instance

psql --host instanceendpoint --port 5432 --username username --dbname dbname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment