⪼ Made with 💜 by Polyglot.
Last active
May 4, 2024 05:59
-
-
Save wilmoore/8d85ea1aa9ab5306eb54 to your computer and use it in GitHub Desktop.
Software Engineering :: Cloud :: AWS :: Amazon S3 :: AWS s3 Static File Deployment
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="TARGET-BUCKET-HERE" | |
# create bucket (idempotent) | |
s3cmd mb s3://$BUCKET_NAME | |
# put index.html | |
s3cmd put --acl-public index.html s3://$BUCKET_NAME/index.html | |
# sync assets directory | |
s3cmd put --recursive --acl-public assets s3://$BUCKET_NAME/ | |
# open in default web browser | |
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