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

Has anyone used this plugin with serverless-step-functions? It doesn't work for me

Open vayias opened this issue 7 years ago • 0 comments

First of all, great plugin, great work!

I was wondering if anyone managed to get this working while using the serverless-step-functions plugin.

I'm using both those plugins and unfortunately it doesn't work, so i was wondering if anyone else ran into the same issues.

What i've done: I created an SQS queue through aws. In serverless I'm giving the permissions to my lambdas to access the SQS queue by doing:

    - Effect: "Allow"
      Action:
        - "sqs:*"
      Resource: "arn:aws:sqs:#{AWS::Region}:xxxxxxxxx:my_deadletter"

Then, in the functions section i'm doing:

functions:
  prepareDynamo:
    handler: functions/my_lambda.lambda_handler
    timeout: 5
    deadLetter:
      targetArn: arn:aws:sqs:us-east-1:xxxxxxxxx:my_deadletter

Then, purposefully, i'm throwing an error in my_lambda function and I'm invoking the lambda asynchronously (I publish a message to SNS and then the sns invokes the lambda).

My lambda function then fails on aws, but then nothing gets enqueued in sqs. By going to aws page and checking my lambda function, i can see that the deadletter queue is correctly defined there, and it has the right permissions.

Any ideas?

vayias avatar Jul 06 '18 21:07 vayias