What’s it all about?

Amazon S3 is great for hosting static websites. Not only because of the performance and reliability, but also because it’s extremely affordable. But S3 can be challenging to set up and optimize.

That’s why we created Upstatic—a free tool that automatically configures and optimizes S3 for static website hosting and takes care of the deploying.

Why use it?

Static websites are getting more and more popular since they can be served much faster to the user, they’re easy to maintain and don’t need databases you need to worry about.

While there are bunch of tools that can deploy static sites straight to Amazon S3, we couldn’t find a single one which would have all the features, speed and ease of use we want from such tool.

Finally, Upstatic isn’t dependent on any external library, adminis­trative privilege, database, runtime or interpreter on your system, so it’ll continue working even though you update your operating system or do any other changes.

Getting started

Using Upstatic is simple. First make sure you’ve downloaded lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia ad minim venim lorem.

[Upstatic]
Bucket = "upstatic.io"
Account = "personal"
UploadDir = "/build"

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Best practices

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[Upstatic]
Bucket = "upstatic.io"
Account = "personal"
Region = "eu-west-1"
UploadDir = "/home/upstatic/site"
DefaultCacheControl = "private, max-age=0"
GzipExtensions = [".html", ".xml", ".json"]

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

User accounts

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[Extension.ttf]
CacheControl = "public, max-age=3600"
ContentType  = "font/ttf"

[Extension.html]
CacheControl = "public, s-maxage=600, max-age=0"

[Redirect]
Rules = [
  ["/twitter", "https://twitter.com/upstatic"]
]

Content types

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Caching

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Gzipping

Lorem ipsum dolor sit amet, et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Redirects

Redirects are defined in the Upstatic configuration file which is usually located inside the directory you’re deploying. Alternatively, if you didn’t use upstatic init command, you might not have the configuration file and have to create it manually.

Adding and editing redirects is very straightforward. First, you need to enable redirects by adding [Redirects] header to the configuration file. Then, inside Rules, you can start defining them:

[Redirects]
Rules = [
  ["/old", "/new"]
  ["/ups", "/upstatic"]
  ["/twitter", "https://twitter.com/upstatic"]
  ["/post-with-wrong-title", "/new-with-corrected-title"]
]

Currently, you can only do 301 permanent redirects, which point any URL under your domain to a different URL on a permanent basis. This is the most common type of redirect and usually the most useful too.

Advanced

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Amazon S3 pricing

Amazon S3 is extremely affordable for static website hosting. If you’re a new user, you can get started without any costs.

Upon sign up, new customers receive 5GB of storage, 20,000 requests and 15GB of data transfer each month for free. This means you’d be most likely hosting your website without any costs during the first year! Amazon will only ever invoice you for the requests and data that go over these limits.

After the first year, Amazon will invoice you monthly based on the amount of requests and data transferred. Based on the current Amazon pricing table, an average website with 100,000 visitors each month and a page weight of 300kB would cost you under $4/month.

Changelog

v1.0.0

  • Initial release

License

Licensed under the MIT License.

Download