Sitemap
The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Follow publication

Deploying a Static Website to S3 and CloudFront Using Github Actions

12 min readNov 11, 2020

--

Introduction

AWS Resources

Linking it all together. Right: source

Route53

Welcome to Route53. Rights: source

CloudFront

CloudFront working with Lambda Edge. Rights: source

s3

Welcome to S3. Right: source

SES

Setup to let people send messages from your website. Rights: source

Setup

Note the lambda function version number 15 is specified

Static Assets

Example output from Webpack build.

Github Actions

Example pipelines from Github.
Cache settings in S3 for html pages so we never cache. Different settings used for other assets.
Cache settings in CloudFront which were set in terraform
Cache set for html files
Response from CloudFront
Set long cache time for all assets
Response from CloudFront
Cache-Control:no-cache (HTML)
OR
Cache-Control:max-age=31536000 (Assets)
Resource names generated by Webpack.

Conclusion

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Alexander Morton
Alexander Morton

Written by Alexander Morton

A DevOps engineer specialised in cloud infrastructure with a background in theoretical and experimental physics.

No responses yet