In today’s post, we’re going to walk through a step-by-step deployment of a static website to an S3 bucket that has CloudFront setup as the global CDN.
The post is written using the AWS TypeScript CDK.
This example is used as a deployment for a static export of a NextJS 10 website. Find the blog post on how to do that here. That being said, this post is aimed at pushing any HTML to S3 to use a static website. I simply use the NextJS content to demo the final product and changes in steps required to get it done.
We need to set up a new npm project and install the prerequisites. We’ll also create a stacks
directory to house our S3 stack and update it to take some custom.
#aws #nextjs #s3 #javascript #typescript