serverless-plugin-lambda-dead-letter
serverless-plugin-lambda-dead-letter copied to clipboard
Resource FooDeadLetterQueue does not exist for stack f-o-o
Summary
Creating a deadletter queue config to an empty stack / new lambda fails. But adding dead letter queue to existing lambda succeeds.
Environment
"serverless-plugin-lambda-dead-letter": "1.2.1",
"aws-sdk": "2.345.0",
Node Version: 11.0.0
Serverless Version: 1.32.0
Steps
Deploying to an empty stack/account with the following config
..
functions:
bar:
handler: src/main/foobar
deadLetter:
sqs:
queueName: ${self:provider.stage}-bar-dead-letter-queue
delaySeconds: 60
messageRetentionPeriod: 1209600 #14 days
receiveMessageWaitTimeSeconds: 15
..
Causes:
functions:
bar: f-o-o-bar
Serverless Error ---------------------------------------
Resource BarDeadLetterQueue does not exist for stack f-o-0
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 11.0.0
Serverless Version: 1.32.0
Workaround
Then when I comment out the deadletter config the deployment goes through. And then I re-add the deadletter config and do a re-deploy to the existing stack. Now the DLQ is created without errors.
functions:
bar: f-o-o-bar
Serverless: (updated) Function 'bar' DeadLetterConfig.TargetArn: arn:aws:sqs:eu-central-1:11111:test-bar-dead-letter-queue
``