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

Implicit permissions SQS disappear. #25

Open
jlgouwyapizr opened this issue Jul 13, 2022 · 4 comments
Open

Implicit permissions SQS disappear. #25

jlgouwyapizr opened this issue Jul 13, 2022 · 4 comments

Comments

@jlgouwyapizr
Copy link

Hey Folks,

I have this lambda which listens a SQS :

listenMediaGrabs:
    handler: src/handler/classifieds/listen-media-grabs.handler
    name: ${self:provider.stage}-${self:service}-listenMediaGrabs
    events:
      - sqs:
          arn: { "Fn::Join" : [":", ["arn:aws:sqs:${self:provider.region}", { "Ref" : "AWS::AccountId" }, "${self:provider.stage}-classified-service-media-grabs-available.fifo"]]  }
          batchSize: 1

Without the plugin, when i deploy the serverless stack, I see thoses permissions on the lambda :

  • sqs:ReceiveMessage
  • sqs:DeleteMessage
  • sqs:GetQueueAttributes

those permissions are handled by serverless in the background. All is working fine. My SQS is read.

But once we use the plugin, we didn't have anymore thoses permissions at all.
The result : that breaks the lambda because the sqs is never read anymore.

How to fix that ? Do we need to have more explicit ?
Why thoses permissions disappear ?

Thanks

@AntonBazhal
Copy link
Owner

Unfortunately, this plugin only adds dynamodb and kinesis permissions automatically. You can always add them manually, though. Alternatively, any help is greatly appreciated 😃, so feel free to open a PR to fix this issue.

@EstebanRdeG-TN
Copy link

EstebanRdeG-TN commented Oct 25, 2022

Oh, I have faced this same issue. I will test the manual permission so... It would be nice if that clarification is added to the description/doc 😄 .

Instead of
# Appropriate permissions will be applied automatically

Something like
# Appropriate permissions will be applied automatically (Only works for Dynamo and Kinesis)

@pt-kojoa
Copy link

encountered the same problem and created a quick draft pull request: #33

Tests are still missing and don't currently have time to add those. Feel free to comment and suggest improvements.

@jlgouwyapizr
Copy link
Author

@AntonBazhal as I just receive the error again today , may I suggest to check the PR of @pt-kojoa

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

4 participants