Skip to content

Instantly share code, notes, and snippets.

@quin2
Created October 17, 2019 16:11
Show Gist options
  • Save quin2/8a1cc139082897c9c1e524fd174ca6c5 to your computer and use it in GitHub Desktop.
Save quin2/8a1cc139082897c9c1e524fd174ca6c5 to your computer and use it in GitHub Desktop.
script to make current directory into a public, static website on aws. requires aws api that's setup and ready to go
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: enter one argment for the static site/bucket name"
exit 0
fi
aws s3 mb s3://$1
aws s3 website s3://$1 --index-document index.html --error-document error.htm
aws s3 sync --acl public-read --sse --delete . s3://$1
echo "$1 =.s3.amazonaws.com"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment