Integrate Cloudfront with Lambda

Read Time 24 mins | Written by: Ryo Hang

Integrate Cloudfront with Lambda

for Content Delivery Customization

MINI LECTURES FOR CLOUD TRICKS

     

Amazon CloudFront is a global content delivery network (CDN) service that securely accelerates the delivery of websites, applications, videos, large files, and APIs to your viewers around the world. In general, Amazon CloudFront can be configured in conjunction with different types of origins from which it will fetch your content. When you configure an AWS origin, you benefit from:

  • Cost optimization: Data transfer out costs from an AWS origin to CloudFront Edge Location is free of charge.
  • Improved performance: Connections to other parts of AWS are made over high-quality networks that are monitored by Amazon for both availability and low latency. This monitoring has the beneficial side effect of keeping error rates low and window sizes high.
         

    Content Delivery Customization

    In previous videos, we have introduced the Lambda function and serverless architecture. In this video, we will focus on how to integrate lambda function with cloudfront to fulfill several important use cases.

    • It can be used to inspect cookies to rewrite URLs to different versions of a site for A/B testing.
    • It can also be used to inspect headers or authorized tokens, inserting a corresponding header and allowing access control before forwarding a request to the origin.
    • It can send different version html based on the User-Agent header for SEO purpose.

    Watch the video, and see how we can send different html to your users based on the User-Agent header for google SEO purpose.

         

    Features of CloudFront

    1. Complete security to the content

    2. Highly Programmable And DevOps friendly

    3. Geographically located

    4. Economical

    5. Deep integration with other AWS services

     

         
         

    ASCENDING is an AWS Certified Consulting Partner. We provide Cloud Strategic Consulting Service, Cloud Migration, Cloud Operation/Optimization and Web/application Development Services to our organization clients. 

         

    Please Click here and subscribe to our YouTube channel.

    And stay tuned for our next mini lecture!

    If you know someone who needs cloud support, please forward this email to them.

    Ryo Hang

    Solution Architect @ASCENDING