Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



38 Commits

Repository files navigation


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:

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

go get -u
go install

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.


And in ~/.aws/config


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):


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] (

2. Use it!

Assume you're going to set up a website and, you can:

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

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

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 --www --ssl --certBody body.pem --certChain chain.pem --privateKey key.pem
aws-site-manager sync --domain

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