# Serverless deploy fails on lambda with event stream

**URL:** <https://forum.serverless.com/t/serverless-deploy-fails-on-lambda-with-event-stream/15453>\
**Category:** Serverless Framework\
**Created:** [June 30, 2021, 11:29pm UTC](https://forum.serverless.com/t/serverless-deploy-fails-on-lambda-with-event-stream/15453 "2021-06-30T23:29:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordanmaxfightcamp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jordanmaxfightcamp/32/5927_2.png) [@jordanmaxfightcamp](https://forum.serverless.com/u/jordanmaxfightcamp)\
**Post date:** [June 30, 2021, 11:29pm UTC](https://forum.serverless.com/t/serverless-deploy-fails-on-lambda-with-event-stream/15453/1 "2021-06-30T23:29:03Z")

</div>

I am using Serverless v 4.26.0

```auto
Plugin: 5.3.0
SDK: 4.2.3
Components: 3.12.0

```

simply trying to set up a lambda with a trigger of stream from DDB. I have the Stream arn as well, but any flavor I try setting the `events` I get the following error:

`An error occurred: IamRoleLambdaExecution - The policy failed legacy parsing`

If I take out the stream event, it works. Here is my code:

```auto
functions:

  sessions-stream-listener:

    handler: handler.listener

    environment:

      SESSIONS_STREAM_NAME: ${self:provider.stage}-sessions-fan-out

    events:

      - stream:

          type: dynamodb

          arn: arn:aws:dynamodb:region:account_id:table/table_name/stream/stream_name

```

I have obfuscated the actual ARN but you get the idea.

I have also tried:

```auto
functions:

  sessions-stream-listener:

    handler: handler.listener

    environment:

      SESSIONS_STREAM_NAME: ${self:provider.stage}-sessions-fan-out

    events:

      - stream: arn:aws:dynamodb:region:account_id:table/table_name/stream/stream_name

```

It seems no matter what, I get this error.

Has anyone had this issue before? Kinda of banging my head on my desk about this. Not sure what I can do.

---

<div class="post-metadata">

**Author:** ![jordanmaxfightcamp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jordanmaxfightcamp/32/5927_2.png) [@jordanmaxfightcamp](https://forum.serverless.com/u/jordanmaxfightcamp)\
**Post date:** [June 30, 2021, 11:32pm UTC](https://forum.serverless.com/t/serverless-deploy-fails-on-lambda-with-event-stream/15453/2 "2021-06-30T23:32:52Z")

</div>

I also used this as reference, [https://www.serverless.com/framework/docs/providers/aws/events/streams/](https://www.serverless.com/framework/docs/providers/aws/events/streams/), which should match the docs.
