I have a lambda function which is suppose to read message from a SQS queue and process. When I deployed everything to AWS and try to call the lambda function getting "errorMessage":"Access to the resource https://sqs.us-east-1.amazonaws.com/ is denied."
However, Lambda function can read the messages when it is run locally through Serverless Offline plugin. I have given proper permission as below. And my project is based on node.js.
Here is the permission block,
- Effect: Allow
Action:
- sqs:*
Resource:
- Fn::GetAtt:
- NotificationQueue
- Arn