Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active May 4, 2024 06:00
Show Gist options
  • Select an option

  • Save wilmoore/a1dab4b797de4114a803 to your computer and use it in GitHub Desktop.

Select an option

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

Software Engineering :: Cloud :: AWS :: Amazon S3 :: push files to s3 and make them public

⪼ Made with 💜 by Polyglot.

#!/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