# Lambda@Edge function don't have trigger attached to them

**URL:** <https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [March 25, 2020, 2:53pm UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892 "2020-03-25T14:53:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vuk](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/vuk/32/4080_2.png) [@vuk](https://forum.serverless.com/u/vuk)\
**Post date:** [March 25, 2020, 2:53pm UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892/1 "2020-03-25T14:53:21Z")

</div>

Hello,

I have a question about Lambda@Edge’s support in Serverless.

What I did so far is that I’ve created a simple function that is just adding a header to a request.

My serverless.yml file has this in it

```
viewer-request:
    name: ${self:provider.stackName}-viewer-request
    handler: src/functions/viewer-request.handler
    memorySize: 128
    timeout: 4
    events:
      - cloudFront:
          eventType: viewer-request
          origin: s3://${self:custom.bucket}.s3.amazonaws.com/files

```

So this is deploying as it should. It deploys lambda, it creates Cloudfront distribution, but it doesn’t attach a trigger to lambda I’ve created. Although when I try to add trigger manually I can use existing trigger (so it is created, just not attached to my lambda)  
Any idea why this happens or what I did wrong?

---

<div class="post-metadata">

**Author:** ![jsw](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jsw](https://forum.serverless.com/u/jsw)\
**Post date:** [August 6, 2020, 8:11pm UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892/2 "2020-08-06T20:11:27Z")

</div>

I’ve run into the same issue. Is there a solution?

---

<div class="post-metadata">

**Author:** ![nickg](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/nickg/32/4557_2.png) [@nickg](https://forum.serverless.com/u/nickg)\
**Post date:** [February 24, 2021, 12:42am UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892/3 "2021-02-24T00:42:44Z")

</div>

Ensure you have the latest serverless version - I was using an old version (I updated to `2.25.2`). e.g.

`curl -o- -L https://slss.io/install | bash`  
or  
`npm install -g serverless`  
or  
`serverless upgrade`

However - I’m getting the issue where, when I update a lambda, it doesn’t attach the Cloudfront trigger to the UPDATED lambda version.

---

<div class="post-metadata">

**Author:** ![beardedtim](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/beardedtim/32/6317_2.png) [@beardedtim](https://forum.serverless.com/u/beardedtim)\
**Post date:** [November 1, 2021, 1:21pm UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892/4 "2021-11-01T13:21:36Z")

</div>

> However - I’m getting the issue where, when I update a lambda, it doesn’t attach the Cloudfront trigger to the UPDATED lambda version.

I am running into this _exact_ same issue. Is this the expected outcome of this or am I misconfiguring the deployment?

---

<div class="post-metadata">

**Author:** ![beardedtim](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/beardedtim/32/6317_2.png) [@beardedtim](https://forum.serverless.com/u/beardedtim)\
**Post date:** [December 1, 2021, 12:41pm UTC](https://forum.serverless.com/t/lambda-edge-function-dont-have-trigger-attached-to-them/10892/5 "2021-12-01T12:41:14Z")

</div>

I solved this problem via a plugin called

@silvermine/serverless-plugin-cloudfront-lambda-edge
