I am using Serverless v 4.26.0
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:
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:
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.