Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lambda can't send message to dlq #40

Open
nivpenso opened this issue Jul 4, 2019 · 2 comments
Open

lambda can't send message to dlq #40

nivpenso opened this issue Jul 4, 2019 · 2 comments

Comments

@nivpenso
Copy link

nivpenso commented Jul 4, 2019

Hi,

I found it not possible to send messages to the DLQ since the execution role of the lambda doesn't include SendMessage policy for the dead letter queue.

It is important to mention that it doesn't matter whether the SQS contains a policy that allows it to receive messages from the Lambda's ARN.

I also contacted Amazon support and they verified that this behavior is right.

@jhdrn
Copy link

jhdrn commented Sep 10, 2020

Hopefully you figured it out, but as I also ran into the same problem I'm sharing my solution:

Add a role statement to serverless.yml:

provider:
  iamRoleStatements:
    - Effect: 'Allow'
      Action:
        - sqs:SendMessage
      Resource:
        - ARN for SQS queue goes here

Ideally this would be done automatically by the plugin.

@OssiPesonen
Copy link

OssiPesonen commented Nov 11, 2020

This should be documented on the README.md. The short examples provided do not contain both creation of the queue and the permission grant. There should be examples on these variations as there are multiple ways of creating the queue.

The one thing that serverless framework and it's plugins often fail, is the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants