Deep Dive Into Serverless

February 7, 2023
Ryan Jones
5 minutes to read

Cloudfront can be simply defined as a CDN (Content Delivery Network), caching your static assets in a datacenter nearer to your viewers. But Cloudfront is a lot more complex and versatile than this simple definition.
Cloudfront is a “pull” CDN, which means that you don’t push your content to the CDN. The content is pulled into the CDN Edge from the origin at the first request of any piece of content.

In addition to the traditional pull and cache usage, Cloudfront can also be used as:

  • A Networking Router
  • A Firewall
  • A Web Server
  • An Application Server

Why is using a CDN relevant?

The main reason is to improve the speed of delivery of static content. By caching the content on the CDN edge, you not only reduce the download time from a few seconds to a few milliseconds, but you also reduce the load and amount of requests on your backend (Network, IO, CPU, Memory, …).


Static content can be defined as content not changing between two identical requests done in the same time frame.

Identical can be as simple as the same URI, or as fine grained as down to the authentication header. The time frame can range between 1 second to 1 year.
The most common case is caching resources like Javascript or CSS and serving the same file to all users forever. But caching a JSON response tailored to a user (Authentication header) for a few seconds reduces the backend calls when the user has the well-known “frenetic browser reload syndrome”.

Edges, Mid-Tier Caches, and Origins

Cloudfront isn’t “just” some servers in datacenters around the world. The service is a layered network of Edge Locations and Regional Edge Caches (or Mid-Tier Caches).

Edge Locations are distributed around the globe with more than 400 points of presence in over 90 cities across 48 countries. Each Edge Location is connected to one of the 13 Regional Edge Caches.

Regional Edge Caches are transparent to you and your visitors, you can’t configure them or access them directly. Your visitors will interact with the nearest Edge Location, which will connect to the attached Regional Edge Cache and finally to your origin. Therefore, in this article, we will refer to Cloudfront as the combination of Edge Locations and Region Edge Caches.

What Have We Learned?

Cloudfront is more than just a simple “pull-cache-serve” service

  • You improve delivery speed to your visitors
  • You can increase resilience by always using a healthy backend
  • You improve overall speed to your backend by leveraging AWS’s backbone
  • You can modify any request to tailor the response to your visitor’s device or region
  • You don’t always need a backend
  • You protect your backend by reducing the number of calls reaching it

Access free book

More from Serverless Guru

Building Serverless REST APIs for a Meal Prep Service with CloudGTO

October 31, 2023
Learn More

How to build an AWS AppSync GraphQL API with multiple data sources

October 26, 2023
Learn More

Building a Secure Serverless API with Lambda Function URL and CloudFront — Part 1

October 17, 2023
Learn More

Serverless Guru Achieves AWS Advanced Consulting Partner

Let's Talk

Serverless Guru achieves AWS Advanced Partner

Serverless Guru has achieved AWS Advanced Partner alongside achieving AWS Lambda, Amazon DynamoDB, and Amazon API Gateway service deliveries. My name is Ryan Jones, founder of Serverless Guru; thank you for celebrating this accomplishment with us!

AWS Advanced Partner

From the inception of the company, achieving AWS Advanced Partner was one of our North Stars.

Today I’m happy to announce that the AWS Advanced Partner North Star has been reached!

This achievement is monumental for us as an organization because it’s required us to grow from a less than 6 person consulting shop to over 30 strong. Alongside our team growth, we’ve grown our client list too. Helping building production serverless applications at companies like AirCanada, Hyatt, and Lottery.

It’s also required dedicated hours of study, meetings, and planning to not only pass AWS certifications, but build a strong relationship with AWS across all of our client projects.

Not only have we been able to come together as an organization unified by this single goal, but in the process, we achieved the AWS Lambda, Amazon API Gateway, and Amazon DynamoDB service deliveries which distinguishes Serverless Guru further as true AWS Serverless Gurus.

Our team

Our team operates from across the globe in places such as the US, Canada, Brazil, India, Bosnia, Tunisia, Indonesia, Cameroon, New Zealand, Germany, Spain, and Nigeria.

We span almost every timezone on Earth and every continent, but Antartica.

We are a group of serverless experts and this is only the beginning of our story!

Our Services

Serverless Guru helps clients build serverless applications on AWS. We specialize in the construction of production serverless workloads. We know what to avoid, where to double down, how to optimize costs, accelerate the build process, and standardize across developers and teams.

If you want to learn more about how we can help with your serverless journey on AWS, please reach out to us by filling out our sales form (below) or emailing us at info@serverlessguru.com.

If you’re interested in working for Serverless Guru, check out our careers page.

It takes a village

Special thank you to the team at Serverless Guru and to everyone who has supported us through the last four years.

See you next time :)

More from Serverless Guru

Join the Community

Gather, share, and learn about AWS and serverless with enthusiasts worldwide in our open and free community.