⪼ Made with 💜 by Polyglot.
-
-
Save wilmoore/a1dab4b797de4114a803 to your computer and use it in GitHub Desktop.
Software Engineering :: Cloud :: AWS :: Amazon S3 :: push files to s3 and make them public
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
| #!/usr/bin/env bash | |
| # bucket name | |
| BUCKET_NAME="$1" | |
| # create bucket | |
| s3cmd mb s3://$BUCKET_NAME | |
| # put index.html | |
| s3cmd put --acl-public index.html s3://$BUCKET_NAME/index.html | |
| # sync build directory | |
| s3cmd put --recursive --acl-public build s3://$BUCKET_NAME/ | |
| # open UI | |
| open http://$BUCKET_NAME.s3.amazonaws.com/index.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment