Skip to content

Instantly share code, notes, and snippets.

View KevinGomezDev's full-sized avatar
:electron:
To ignore truth makes you slave of a lie

Kevin Gómez KevinGomezDev

:electron:
To ignore truth makes you slave of a lie
  • Medellin - Colombia
View GitHub Profile
@KevinGomezDev
KevinGomezDev / S3-Static-Sites.md
Created June 21, 2021 17:54 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream