1

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 Serverless framework using node.js. Here is the permission block,

- Effect: Allow Action: - sqs:* Resource: - Fn::GetAtt: - NotificationQueue - Arn

1 Answer 1

0

Figured out the problem that was due to improper indentation of iamRoleStatements statement. Due to that Serverless has not updated policy under lambda execution role.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.