↓ Skip to main content
  1. Posts/

Serving static pages on AWS with Amplify

Daniel Ancuta
Author
Daniel Ancuta
Backend team lead, with 19 years of hands-on experience with modern technologies, as well as 7 years of experience in leading of development teams. Let us get in touch!

After creating branding for your static website - layout, logo, typography, content, and so on - serving it should be easy, right?

But often, it’s overcomplicated. You think about a custom solution for the engine, look at WordPress, and realize it’s overkill for what you need.

If that’s the case, I have two solutions you might want to consider:

  1. GitHub Pages + Hugo + Cloudflare
  2. AWS Amplify + Hugo

Both are great setups that will allow you to serve your static page (blog, simple company website, portfolio…) at little to no cost.

Let’s break them down!

Hugo
#

In both options, I mentioned Hugo.
Hugo is a really great static site generator that fits most requirements for a static page.
Even better - it’s supported by both GitHub Pages and Amplify. 🙂

GitHub Pages + Hugo
#

This great duo allows you to serve your site with no hosting cost at all. All you really need is a GitHub account.

The page is built using GitHub Actions. After a successful build, it will be available at {your-nickname}.github.io.

You might ask, “Well, that’s great, but what about my domain?” - don’t worry!
GitHub Pages supports custom domains.

A great example is this very website you’re reading: ancuta.org - built with GitHub Pages + Hugo.

If you want to add an SSL certificate, check out Cloudflare, which offers a free SSL option.

Look at source code of this website whisller/whisller.github.com

AWS Amplify + Hugo
#

AWS Amplify is a great tool when building web/mobile apps that connect to a backend.
I mentioned it in another article.

But even for simpler setups, Amplify works really well with static site generators like Hugo!

The setup is very simple:

  1. Use an AWS Route 53 Hosted Zone to handle your domain.
  2. Grant access for Amplify to your GitHub repository.
  3. Configure amplify.yml
  4. Push your static page to GitHub. 🎉

That’s it! In most cases, you’ll only pay for the hosted zone - about $0.50/month.

No complicated setup needed. You can get the whole thing done in an evening.

Final Thoughts
#

As you can see, setting up your blog or a simple static site is easier than ever.
No more excuses - start your blog today! :)