Jamstack websites are one of our favorite flavors of web architecture for many reasons, so simplifying deployments is an absolute must for us.
You might already be familiar with great services like Netlify or Vercel that make deploying static static websites easy with just a few clicks. The main drawback of these services though is that deployments are not very scalable since they require manual configuration steps.
That’s where a tool like Terraform comes in. Terraform lets you configure your website’s entire infrastructure stack so that your deployments are reproducible, secure, collaborative (i.e. team-centric) and fully automatable.
So what else is there to think about? Let’s get to coding!! 🦾
High-level architecture
The main components of the infrastructure are:
- S3 will be our infinitely-scalable web server.
- ACM certificate to enable HTTPS/SSL.
- CloudFront CDN to cache assets close to our user’s geographic location.
- Route53’s hosted zone will act as our DNS server where we’ll hook up our domain.
Show me the code…
Here’s a link to the example code repo which you can clone and adapt to your own needs:
https://github.com/RockinDev/vlog/tree/main/aws-static-website
Video walkthrough
We also uploaded a video tutorial that walks you through all the steps needed to deploy your website:
Next steps
Stay tuned for an upcoming series where we show you how to fully automate deployments to AWS using GitHub Actions and more!
