Home / Companies / Contentful / Blog / Post Details
Content Deep Dive

Creating a Secure Media CDN with CloudFront and Lambda@Edge (Part II)

Blog post from Contentful

Post Details
Company
Date Published
Author
Leonardo Freitas dos Santos
Word Count
1,129
Language
English
Hacker News Points
-
Summary

This is a step-by-step guide to building a CloudFront distribution that serves S3 media, performs on-demand image transformation, and authenticates incoming requests using Cloudinary. The process involves creating an origin-request Lambda function in TypeScript, adding dependencies, modifying the Lambda function to proxy requests to Cloudinary for transformations, deploying the function as a CloudFront Lambda@Edge, and attaching it to a CloudFront distribution. The guide covers topics such as query parameter handling, transformation of query strings, and response formatting, providing a detailed overview of the process.