URI Route class for AWS Lambda@Edge to serve CloudFront #5175
-
I'm hosting my blog on AWS CloudFront. I have configured a Lambda function to review the URI from CloudFront to ensure the user gets the correct folder/file from my S3 bucket. I've written a very rudimentary nodejs script, but now I need something a bit more complex as I changed my URI schema. I need to redirect users to the new URI schema. I need the router to be fast and lightweight. Express.JS is too big for my use-case. Input is a JSON object that includes the origin URI. I need to return a JSON object with the (string) location of the file on my S3 bucket. Is there a router class for Hexo SSG site like this already? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@lorezyra |
Beta Was this translation helpful? Give feedback.
-
I resolved it by building my own Lambda@Edge script to inspect the HTTP traffic. Something similar to the script above. |
Beta Was this translation helpful? Give feedback.
I resolved it by building my own Lambda@Edge script to inspect the HTTP traffic. Something similar to the script above.