Skip to main content

Start a website in 24 hours

·273 words·2 mins
Themes Guide - This article is part of a series.
Part : This Article

A guide on creating a static website with HTTPS support using AWS S3, Route53, Certificate Manager, CloudFront and Hugo

Overview #

Creating a website with custom domain and proper security (SSL) is not hard at all. Here is an approach that uses AWS technologies along with Hugo, an open source static site generator. Prerequites for getting started are 1) an account on Amazon Web Service 3) basic familiarity with git 3) ~$12 to register for a custom domain

Markdown Monster icon Here are the high level steps:

  1. Create S3 buckets for static website hosting on AWS
  2. Setup domain name using AWS Route53
  3. Request SSL certificate using AWS Certificate Manager
  4. Configure AWS CloudFront for serving website content over HTTPS
  5. Use Hugo, a static site generator, to manage website content

Step 1: S3 Buckets #

Step 2: Custom domain registration #

Step 3: SSL Certificate #

Step 4: Cloud Front #

Step 5: Hugo - static website generator #

Out of many static website generators to choose from: Hugo stood out as an easy-to-use utility that has decent documentation and community for quick ramp-up. Use the following steps to get started:

  1. Download Hugo via Homebrew on MacOS or chocolatey on Windows
    brew install hugo
    or
    choco install hugo
    
  2. Start a project folder using the following command: hugo new site quickstart
  3. Add configuration into config.toml to indicate where to deploy the site
    name = "AWS"
    URL = "s3://<enter your domain name here>.com?region=us-east-1"
    cloudFrontDistributionID = "<enter your cloud front distribution id here>"
    
  4. Run command hugo deploy to upload new content into AWS S3 and reset CloudFront cache
  5. For more information, review “hugo deploy” documentation from Hugo website

see also:

Themes Guide - This article is part of a series.
Part : This Article