This is a tutorial on hosting a static website on Amazon S3 and Cloudfront. I made this based on an Angular 6 frontend but this write up can also be used as a guide for other frameworks like React or Vue.js. This tutorial also assumes that you already have an Amazon AWS account and domain name through Google Domains or Amazon Route 53. I use Google Domains as a registrar but I will also cover using Amazon Route 53.
Hosting a static SPA on AWS is a pretty straightforward process. This guide will cover:
- Creating and configuring an S3 bucket for a Single-Page Application (SPA)
- Uploading an application to an Amazon S3 bucket
- Creating and configuring a Cloudfront Distribution
- Configuring Google Domains OR Amazon Route 53