Table of Contents
Open Table of Contents
Show what I’ll be deploying
- Use cloudfront URL so you don’t reveal
ifcodingwerenatural.comyet - Show the file uploader thingy. I’ll show the rest of the blog site later.
A thing or two from last time:
-
CORS is an opt in policy, so I assumed by not setting the
corsoptions, the response would not include CORS headers, and therefore I would not have to deal with CORS.Setting
cors: trueturns out to have the opposite effect I thought it would have, which is, it adds CORS headers, but allows any method and any origin by default.TL;DR: if you don’t want to deal with CORS, set
cors: truein the config. -
Show the changes I made
- Changed the bucket name from
buckettoimages.
- Changed the bucket name from
Deploy to CloudFront and explain the architecture.
- In last video, I showed that I could upload an image to S3 from my local machine. Upload an image on the deployed site to demonstrate it works in the cloud
- Create a cronjob to delete images.
Introduce ifcodingwerenatural.com.
- If I’m going to make a tutorial on deploying a website, I might as well launch a website for my YouTube channel while I’m at it!
- Show that I deployed using the
StaticSiteconstruct instead ofAstroSite. - Explain that my blog site needs almost no JS. One of Astro’s main selling
points is shipping zero JS, and my blog site certainly doesn’t need SSR,
so even though there’s an
AstroSiteconstruct, theStaticSiteconstruct makes more sense for my needs, (this is becauseAstroSiterequires you configure astro with SSR enabled).
Next Up
Next up, Live Lambda!