Setup and sync an S3 bucket for website serving
npm install -g blofeld
Yes, I'm using npm to distribute a shell script.
blofeld -t target_bucket -f folder [-s short_expiry_files] [-g gzipped_files]
Let's say you have a folder,
dist, that you want to serve from the S3 bucket
my-awesome-website. That's easy, it
blofeld -t my-awesome-website -f dist
This creates the bucket, tells S3 to serve it as a website, and syncs
dist to it. Nice.
By default, Blofeld sets the expiry to one year. You probably want say HTML files to expire quickly, so list them on the
blofeld -t my-awesome-website -f dist -s "dist/index.html dist/faq.html"
blofeld -t my-awesome-website -f dist -g "dist/app.js"
If you want Blofeld to gzip the files itself, add the
More configuration coming soon.
Blofeld requires the AWS command line tool, which can be installed via Pip:
pip install awscli
aws configure to set up your credentials.
MIT. © MMXIV Matt Brennan