Beyond the Edge

Lambda functions stormed the world of computation, followed by Lambda @ Edge. But beyond the edge, AWS recently introduced the Cloud front Functions. They can do wonders on the content we serve through the Cloud Front. We can do wonders with such functions.

What is Cloud Front Function

Cloud Front distributions have to perform a level of computation when they serve out traffic to our requests. This includes caching, URL routing to the right origin, etc. The Cloud Front functions allow us to play with this. Now it is not just choosing a managed caching model or predefined origin policy. With Cloud Front functions, we can process each request independently, with our custom code — at a very low cost.

The below image (from AWS documentation) describes the relation between Lambda, Lambda @ Edge, Cloud Front Functions, Cloud Front distributions and the Origin.

Example

Let us check out an example, and play with the Cloud Front functions. There is one thing that any web developer dreads. It is perhaps the greatest enemy of any web developer. Something we all wished did not exist. Yet, we have to face it. You guessed it right — the Internet Explorer! I don’t know why, some people cannot get over it, and they have to use it for visiting my website.

I know it is possible, and I can fix the issues and make my website work for IE as well. But, I feel someone who is still stuck on IE does not deserve all that effort. I would rather bar them from visiting my website.

Cloud Front functions let us do that. Let’s see how.

#aws #serverless #lambda

AWS Cloud Front Functions
1.25 GEEK