serverless-plugin-lambda-dead-letter icon indicating copy to clipboard operation
serverless-plugin-lambda-dead-letter copied to clipboard

Configuration error at 'functions[function-name]' unrecognized property 'deadLetter'

Open jordanmaxfightcamp opened this issue 3 years ago • 12 comments

Receiving this error after trying to use this plugin:

 Serverless Error ----------------------------------------
 
  Configuration error at 'functions['sessions-stream-listener']': unrecognized property 'deadLetter'
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.17.0
     Framework Version:         2.46.0 (local)
     Plugin Version:            5.3.0
     SDK Version:               4.2.3
     Components Version:        3.12.0

here is my code:

plugins:
  - serverless-plugin-lambda-dead-letter

functions:
  foo:
    handler: handler.foo

    deadLetter:
      sqs: ${self:custom.foo}
    events:
      - stream:
          type: dynamodb
          arn: ${self:custom.foo}}

Any suggestions? not sure what im doing wrong.

jordanmaxfightcamp avatar Jul 01 '21 04:07 jordanmaxfightcamp

Same issue here

Your Environment Information --------------------------- Operating System: linux Node Version: 12.22.1 Framework Version: 2.50.0 Plugin Version: 5.4.3 SDK Version: 4.2.3 Components Version: 3.13.2

johannesdr-tb avatar Jul 07 '21 13:07 johannesdr-tb

Same issue here too

Your Environment Information --------------------------- Operating System: linux Node Version: 14.4.0 Framework Version: 2.52.1 (local) Plugin Version: 5.4.3 SDK Version: 4.2.6 Components Version: 3.14.2

carlosroberto555 avatar Jul 29 '21 12:07 carlosroberto555

@jordanmaxfightcamp @johannesdr-tb @carlosroberto555 We ran into this as soon as we updated to Serverless 2.x. Are you all on Serverless 2.x?

Looks like Serverless now has a native way to handle dead letter queues which should remove the need for this plugin.

(The plugin readme mentions "At the time this plugin was developed AWS Cloudformation (and serverless) did not support the DeadLetterConfig property of the Lambda", which seems to imply they now do support that property.)

herstand avatar Jul 29 '21 21:07 herstand

@herstand thanks for your comment.

Looks like Serverless now has a native way to handle dead letter queues which should remove the need for this plugin.

But the following configuration only works with SNS, when using SQS it is still necessary to use this plugin More information here.

carlosroberto555 avatar Jul 30 '21 19:07 carlosroberto555

Was anyone able to get this to work?

fh-cmays avatar Aug 03 '21 19:08 fh-cmays

Already exists a PR #44 made by @amilliken-ext with the fix for this issue. Please accept that @gmetzker.

Workaround using his branch:

yarn add -D amilliken-ext/serverless-plugin-lambda-dead-letter

carlosroberto555 avatar Aug 03 '21 20:08 carlosroberto555

Any updates on this issue?

haguirrear avatar Dec 15 '21 00:12 haguirrear

Still have this issue. :(

thiwanka-aux avatar Dec 15 '21 04:12 thiwanka-aux

Please,merge the fixing PR.

oak2 avatar Jan 03 '22 19:01 oak2

Any chance of merging this one?

philipwigg avatar Feb 15 '22 16:02 philipwigg

hope this PR is merged soon!

manuel-EGO avatar Mar 03 '22 09:03 manuel-EGO

I wasn't really familiar with Lambda DLQs when I hit this issue, so this is what I learned in case it helps anyone.

Lambda Dead Letter queues are not still supported by Serverless natively even in v3 (as opposed to SQS DLQs, which I think are supported).

In 2019, AWS launched Lambda "destinations" which has the same functionality (and more) and is also "preferred".

From the launch blog...

Dead Letter Queues (DLQ) have been available since 2016 and are a great way to handle asynchronous failure situations. Destinations provide more useful capabilities by passing additional function execution information, including code exception stack traces, to more destination services.

Destinations and DLQs can be used together and at the same time although Destinations should be considered a more preferred solution.

Destinations are supported by Serverless natively so there's a possibility to switch to "Destinations" and you don't need this plugin anyone.

The payload format that is received by the DLQ when using Destinations is slightly different so you might need minor code changes if you have code that reads from the DLQ.

philipwigg avatar Mar 03 '22 10:03 philipwigg