Questions tagged [aws-lambda-edge]

AWS Lambda Edge or Lambda@Edge, lets user run AWS Lambda Functions across AWS edge locations globally using AWS-Cloudfront, which helps in sending responses to end users at the lowest latency.

AWS Lambda@Edge is a part of Amazon Web Services (AWS), which allows user to run AWS Lambda Functions across AWS edge locations globally.

It helps users in sending responses to their end users at the lowest latency by using AWS-CloudFront.

Lambda functions can be triggered by CloudFront events, such as requests for content to or from origin servers and viewers. Read More

Resources:

Documentation: What is AWS lambda@Edge?

Examples: Lambda@Edge

268 questions
0
votes
0 answers

CloudFront to redirect URL

I have CloudFront setup for domain.com to server static contents from S3 and everything else from ELB -> EC2 Want to setup permanent redirect for domain.ca to domain.com. Haw can I do this in CloudFront ? Is Lambda@Edge efficient way ?…
roy
  • 6,344
  • 24
  • 92
  • 174
0
votes
1 answer

How to redirect or block cloudfront url when query param not found

I have the s3 resource mapped in cloudfront to cache image, i´m trying to redirect to another page, unsuccesfully. The cloufront URL is similar on…
Mister B
  • 123
  • 2
  • 15
0
votes
1 answer

CloudFront origin-response return status: '403'

I have setup CloudFront with S3 origin to serve images from S3. Now Adding Lamnda@Edge for image conversion. which works based on status code (200 or 404) But Cloudfront event for origin-response always has status: '403' Here is the sample response…
roy
  • 6,344
  • 24
  • 92
  • 174
0
votes
1 answer

CloudFront with Lambda@Edge not getting triggenred

I am trying to deploy following Lambda function 'use strict'; const userAgent = require('useragent') const path = require('path') module.exports.viewer = async (event, context, callback) => { const request = event.Records[0].cf.request const…
roy
  • 6,344
  • 24
  • 92
  • 174
0
votes
0 answers

Does AWS Cloudfront cache the entire web page?

Does AWS cloudfront cache the entire page? I would like to clear the cache based on the last time page modified ? Can I clear the cache based on Last-Modified or If-modified-since header values.
0
votes
1 answer

Add Trust Relationship to Lambda Role using Cloudformation

I'm generating a static website and a lambda on AWS using CloudFormation. The Lambda function is going to be an @Edge lambda, but in order to register it as an Edge lambda, I need the lambda to have a Trust Relationship with…
Yossale
  • 14,165
  • 22
  • 82
  • 109
0
votes
2 answers

Verify JWT Claims using Python with limitations - A real challenge

I trying to decode some JWT tokens using Python 3 and AWS Lambda@Edge. Here are the limitations and restrictions: AWS Lambda@Edge limits the code to be a maximum of 1 MB (zipped). This includes all third party packages I must use Firebase's Public…
0
votes
1 answer

Serverless Framework - Lambda@Edge Deployment for a predefined Cloud Front Distribution

I have been trying for a day to configure automating a lambda@Edge to be associated with a Distribution through the serverless framework but things aren't working well. Here is the documentation and they said we can use a predefined cloud front…
0
votes
0 answers

Is it possible to make a request from Lambda@Edge by origin response event?

Is it possible to make a request from Lambda@Edge by origin response event? User L@E Origin-1 Origin-2 | | | | |----GET---->| | | | |----GET---->| | …
0
votes
0 answers

Unable to update the incoming CloudFront request using Lambda Edge

I am working on a feature where the incoming requests from CloudFront are intercepted using Lambda Edge and then the program checks if there is a jpg file of same name present in S3. If yes, it updates the request to use jpg file otherwise use png…
0
votes
0 answers

How to convert node.js code to python using AWS Lamda@Edge

I have this code in node.js. I just research this one and I want to convert this to python. This code is to put signed URL on .m3u8 manifest file. Does anyone know how to do this? I'm using AWS Lambda function. Converting this node.js code to…
Codeblooded Saiyan
  • 1,457
  • 4
  • 28
  • 54
0
votes
1 answer

Deploying OpenVINO models on AWS Lambda

AWS Lambda limits the size of code and dependencies to 250mb and so installing OpenVINO is not viable. However, OpenVINO offers a Deployment Manager which creates a deployment package by assembling the model, IR files, your application, and…
0
votes
1 answer

Setting HTTP Headers with Lambda@Edge

I am trying to add some new http headers for security purposes on my site. The site uses Cloudfront for the CDN and Im using Lamdba@Edge to run the following node function on the origin response: exports.handler = async (event, context) => { …
DataGuy
  • 1,695
  • 4
  • 22
  • 38
0
votes
1 answer

Fix Cloudfront 403 Access Denied request errors when using Lambda@Edge for pretty URLs

I have a simple HTML file that loads a json file that sits right next to it. I followed some AWS docs here Implementing Default Directory Indexes since my website is structured like: /apple/index.html /orange/index.html and I need my users to be…
Phil W
  • 11
  • 3
0
votes
1 answer

lambda@edge cloudfront resource creation

I'm a little lost here, I'm trying to deploy a simple function that uses Lambda@edge but I having some problems creating the Cloudfront resource and attaching that CF to the lambda function. Here is an example of the serverless.yml service:…
Diego
  • 493
  • 1
  • 9
  • 26