All Projects → oursky → aws-site-manager

oursky / aws-site-manager

Licence: other
Very simple CLI to create S3 / Cloudfront Static Website

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to aws-site-manager

Miles
Swift Playground that creates jazz improvisations (WWDC 2018)
Stars: ✭ 31 (+19.23%)
Mutual labels:  playground
less
Go serverless website on AWS Lambda.
Stars: ✭ 22 (-15.38%)
Mutual labels:  aws-s3
backmeup
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.
Stars: ✭ 80 (+207.69%)
Mutual labels:  aws-s3
mypy-playground
The mypy playground. Try mypy with your web browser.
Stars: ✭ 58 (+123.08%)
Mutual labels:  playground
s3upload
Upload multiple files to AWS S3, make them public, and get their URLs easily from the command line.
Stars: ✭ 24 (-7.69%)
Mutual labels:  aws-s3
ginger
Serverless framework for Go runtime.
Stars: ✭ 16 (-38.46%)
Mutual labels:  aws-s3
docx-to-pdf-on-AWS-Lambda
Microsoft Word doc/docx to PDF conversion on AWS Lambda using Node.js
Stars: ✭ 42 (+61.54%)
Mutual labels:  aws-s3
js-playground
A JS playground with some decent visualization
Stars: ✭ 85 (+226.92%)
Mutual labels:  playground
nearley-playground
⛹ Write Grammars for the Nearley Parser!
Stars: ✭ 76 (+192.31%)
Mutual labels:  playground
A-Star
A* pathfinding library in Swift.
Stars: ✭ 34 (+30.77%)
Mutual labels:  playground
Assembleash
WebAssembly and Typescript-like languages playground
Stars: ✭ 71 (+173.08%)
Mutual labels:  playground
bookshelf
My GraphQL playground
Stars: ✭ 64 (+146.15%)
Mutual labels:  playground
ossperf
A lightweight tool for analyzing the performance and data integrity of object-based storage services
Stars: ✭ 67 (+157.69%)
Mutual labels:  aws-s3
multer-sharp-s3
Multer Sharp S3 is streaming multer storage engine permit to transform / resize the image and upload to AWS S3.
Stars: ✭ 54 (+107.69%)
Mutual labels:  aws-s3
kotlin-playground-wp-plugin
WordPress plugin which allows to embed interactive Kotlin playground to any post via [kotlin] shortcode
Stars: ✭ 35 (+34.62%)
Mutual labels:  playground
createml-playgrounds
Create ML playgrounds for building machine learning models. For developers and data scientists.
Stars: ✭ 82 (+215.38%)
Mutual labels:  playground
image-uploader
JavaScript Image Uploader Library for use with Amazon S3
Stars: ✭ 19 (-26.92%)
Mutual labels:  aws-s3
lamba-thumbnailer
AWS S3 Video Thumbnailer with Lambda
Stars: ✭ 21 (-19.23%)
Mutual labels:  aws-s3
emacs-easy-jekyll
Emacs major mode for managing jekyll
Stars: ✭ 53 (+103.85%)
Mutual labels:  aws-s3
UInt256
An UInt256 library written in Swift 4
Stars: ✭ 20 (-23.08%)
Mutual labels:  playground

aws-site-manager

A very simple CLI to create S3 / Cloudfront Static Website. You can also reference our blog for more details.


Install it

Download binary from latest release: https://github.com/oursky/aws-site-manager/releases/

Compile from source: if you have Go 1.6 or above installed, run the following command:

go get -u github.com/oursky/aws-site-manager
go install github.com/oursky/aws-site-manager

How to use it?

1. Set up AWS Credentials and config

If you haven't set up AWS credentials on your environment before, you shall set it up by putting the following lines in ~/.aws/credentials.

[default]
aws_access_key_id=[MY_KEY_ID]
aws_secret_access_key=[MY_SECRET_KEY]

And in ~/.aws/config

[default]
region=us-west-2

You should also set the environment variable of AWS_SDK_LOAD_CONFIG (or put the following line in ~/.bashrc if you're on Linux / Mac assume you're using bash):

export AWS_SDK_LOAD_CONFIG=1

If you have multiple profiles, you can specify it with env var AWS_PROFILE (which is [default] if missed)

For security best practices, you can use an AWS IAM users with appropriate S3 and Cloudfront permission. The Create command also need IAM permission for upload of HTTPS certificate.

You can read more about AWS CLI set up on its [official documentation] (http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html).


2. Use it!

Assume you're going to set up a website example.com and www.example.com, you can:

cd ~/my_html_css_js
aws-site-manager create --domain example.com --www
aws-site-manager sync --domain example.com

The command above will set up a S3 bucket example.com and www.example.com, sync all files in local folder, and redirect www.example.com to example.com

If you want to use https, and got the cert in PEM format ready (if your SSL registry sent you .key / .crt, read this)

cd ~/my_html_css_js
aws-site-manager create --domain example.com --www --ssl --certBody body.pem --certChain chain.pem --privateKey key.pem
aws-site-manager sync --domain example.com

After setting up the code above, you would need to set up Route53 or your DNS Manager to the CloudFront Distribution endpoint.


What's next?

aws-site-manager is very preliminary, feel free to create issues if you run into any problems; Feel free to send us pull requests. And here are a list of things I'm working on:

  • Support using gzip on cloudFront instead of S3
  • Remember config so next time you can just run aws-site-manager sync on the local folder
  • Better control on HTTP header, Custom page for Error code
  • Support using Let's Encrypt free SSL cert or ACM cert
  • Automatically configure Route-53 too
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].