Created
October 17, 2019 16:11
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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