Creating an S3 Static Website

A Storage Solution that Doubles as a Serverless Compute Solution

What is Serverless Compute?

To build a serverless compute static website, technicians should become familiar with serverless compute. Serverless compute doesn't literally lack a server, obviously that's impossible, instead it refers to a tenancy style that doesn't bill for CPU cycles or RAM usage. You're only billed for the logical size of the files and HTTP methods (POST, GET, PUT, etc.) used for the website.

One of the biggest trade-offs serverless compute introduces is the lack of serverside coding capacity. Just to name a few, you cannot use PHP, Python, or Javascript serverside runtimes like NODE. You're not hosting a web game with a shared leaderboard. If standard JS and its libraries/frameworks will get you by, you're a perfect candidate for serverless computing.

Getting Started

Using Amazon Simple Storage Solution (S3), we need to activate the web feature. These steps assume an already existing S3 Bucket.

  1. Sign in to the AWS Management Console and open the Amazon S3 console.
  2. Open the properties for the bucket that's hosting the website.
  3. Pick Edit on Static website hosting.
  4. Pick Enable under Static website hosting.
  5. For Index Document, enter the name of the home page file. This is usually index.html Make sure it's stored on the root of the bucket.
  6. Save your changes.
  7. Write down or otherwise keep in mind the endpoint within the Static website hosting category so you can share it to others.

If you don't want to use your own domain name or https, you're finished. S3 Buckets on their own don't support https, but it can be integrated with CloudFront and Route 53. You can see that I've deployed it here successfully. You can find more information on the official AWS Documentation.