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
3 answers

Lambda@Edge: Cannot enable replication for the specified Lambda function

I'm trying to use CLI, and Ansible to deploy a CloudFront instance with attached Lambda / Lambda@Edge functions. But I'm running into the following error: Lambda@Edge cannot enable replication for the specified Lambda function. Update the IAM…
0
votes
1 answer

Routing bot-traffic to different server with Lambda edge

I am trying to route traffic coming from bots (Google, Facebook etc.) to an entirely different server hosted with elastic beanstalk on AWS. When looking for examples, I only come across people who route their traffic to another S3 bucket like…
Xen_mar
  • 8,330
  • 11
  • 51
  • 74
0
votes
1 answer

Where is the lambda@edge aws executed

We deployed a lambda@edge with the cloudfront. We see that the default limit is 1000 lambda concurrency per AWS Region. As I understand, lambda@edge is executed at the edge location, and this edge location is attached to a region (for example…
0
votes
1 answer

Is there any way to disable the *Alexa cards* from AWS lambda (Node JS)?

I have not enabled display interface, not using renderer template, not using Alexa presentation language but still I am getting Alexa card in FireTV cube whenever I invoke any intent in my custom skill. Is there any API available in response builder…
0
votes
1 answer

AWS Lambda trigger function only if conditions are met

I have just started my learning path with AWS Lambda and CloudFront. I found quite easy to manipulate request and response, but I am blocked to achieve a simple task. Given the code below, I wanted to trigger actions only in the case where the user…
Leonardo
  • 9,607
  • 17
  • 49
  • 89
0
votes
1 answer

I want to change the URL from AWS CloudFront with the help of AWS lambda

I have this an URL, let's assume, "www.sample.com/hello". Now I have triggered a lambda function on viewer request where I just need to change the url to "www.sample.com/hello2". I did it using lambda edge functions but it is throwing me an…
0
votes
0 answers

How do I re-route a request from one domain to another domain in AWS CloudFront?

I have a lambda function (e.g. /getName). This will be hosted by one domain (e.g. A) and can be triggered by multiple domains (A, B, C, etc.). I need to set up CloudFront so that a request to /getName from Domain B gets re-routed or re-directed to…
0
votes
0 answers

Why are my cache-control values different between curl calls with/without a "--compressed" flag?

I have a very tentative understanding of headers, caching and curls in general, let alone Cloudfront/S3 and what those're doing — so, sorry if this ends up not making any sense at all. Currently, we have a Lambda Edge script with an originResponse…
0
votes
1 answer

Lamda@edge Client Reponse return information to client script

I have a working Lambda@edge on the Client Response. I have a little data I need to get to the client. The response body cannot be modified, and I want to see if it is possible to get this data back another way without having to do a custom…
Randy Hall
  • 7,716
  • 16
  • 73
  • 151
0
votes
1 answer

Lambda@Edge Cache-Control header not present Cloudfront

I've images stored on S3 and a lambda function to resize them on the fly. While doing it I add CacheControl: 'max-age=31536000' to the resized images and also add a Cache-Control header: .then(buffer => { // save the resized object to S3 bucket…
gtournie
  • 4,143
  • 1
  • 21
  • 22
0
votes
1 answer

Speed fix or alternatives in lambda@edge

I have a lambda@edge running on a client request. I'm dropping messages into SQS to be processed by another lambda. The first run of my script after an update is extremely long - often blowing through the five second hard timeout, which is not a…
Randy Hall
  • 7,716
  • 16
  • 73
  • 151
0
votes
0 answers

Redirect URL while persisting starting URL in AWS

I have have the following ask: There is an existing application that has the url for mysite.com Users can come from different domains: example.com or example1.com etc. I need to redirect users to mysite.com from example.com or example1.com. They…
0
votes
1 answer

Cloudfront url rewrite using lambda@edge

I want to have friendly paths for my images. For example: "https://xxxxxx.cloudfront.net/images/friendly-file-name-132456.jpg" But, actually the pysical path in S3 is: "https://s3.amazonaws.com/images/132456.jpg" More or less same as AWS…
eli
  • 167
  • 1
  • 9
0
votes
0 answers

lambda@edge count s3 asset views

I am trying to create a lambda function that counts how many times an asset (in this case an mp4 file) is accessed from s3. This will be used to update a db that stores the views for each file. Trying to used lambda@edge to get viewer request…
0
votes
1 answer

Cloudfront conditional expiry

Can Lambda@Edge be used to expire the Cloudfront cache and force the fetch of a fresh version of a webpage? I know that for the static assets something an additional query string can be added to avoid the cached version but now I'm asking for actual…
titel
  • 3,454
  • 9
  • 45
  • 54
1 2 3
17
18