Introducing Caching to a Serverless Application with CloudFront
1h 46mIntermediate2022-05-04
Authors

Brett McLaughlin
Chief Technology Officer at Volusion
Course details
The performance of a website or web application is perhaps the most important aspect of your site. Without good performance, people will often abandon your site regardless of what it offers. Caching has become one of the most popular and effective ways to speed up the delivery of content to users that have little patience for underperforming websites or applications. In this course, Brett McLaughlin shows you how a powerful, flexible, low-cost caching mechanism like AWS CloudFront can help you build and support performance web sites and applications. Brett demonstrates how to use CloudFront to do everything from basic caching of a static website, to fronting an API gateway with Lambda calls and providing dynamic content. Lastly, he explains how authentication and authorization figure into caching, along with more advanced next steps to explore in caching.
Skills covered
Amazon Web Services (AWS)AmazonCloud ServicesProjectCloud PlatformsCloud Computing
Concepts
0. Introduction
- 01 - Increase your serverless site's performance with CloudFront
- 02 - The power of performance and caching
- 03 - Using the exercise files
- 04 - A few helpful videos to watch first
1. Adding CloudFront to a Static Website
- 05 - Set up an S3 bucket for website hosting
- 06 - Deploy a website to an S3 bucket
- 07 - Verify the origin of the website files you access
- 08 - Create a CloudFront web distribution
- 09 - Verify cache usage with Chrome network monitor
- 10 - Update your DNS records to point to CloudFront
2. Adding CloudFront to a Serverless Application with Amplify
- 11 - Web applications are just interactive websites
- 12 - Setting up hosting with Amplify is setting up CloudFront
- 13 - Examine an Amplify-generated hosting setup
- 14 - Use the console and the CLI to configure your distribution
- 15 - Remember to keep verifying caching
- 16 - Remove your CloudFront distribution when you don't need it
3. Adding CloudFront to Cache API Gateway Results
- 17 - Cache requests to API endpoints
- 18 - Mock a GET endpoint in an API gateway
- 19 - Deploy your API and test with curl
- 20 - Create a CloudFront distribution
- 21 - Test your distribution with curl and CloudWatch
4. Restricting S3 Content Using CloudFront and Lambda@Edge
- 22 - Visualize authentication and authorization in your flow
- 23 - Create a new lambda function
- 24 - Add a lambda function to AWS
- 25 - Set up a new trust relationship for your lambda function
- 26 - Instruct CloudFront to invoke your lambda function
- 27 - Test out authentication on your CloudFront distribution
Conclusion
- 28 - Go further with caching