Each Lambda feature has an attached role that you can specify permissions for the IAM control panel. If you give the role of lambda-resolution functions permission to click on the SQS queue, you're good to go. For example, attach this JSON as a custom role (see http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/SQSExamples.html ):
{
"Version": "2012-10-17",
"Id": "Queue1_Policy_UUID",
"Statement":
{
"Sid":"Queue1_SendMessage",
"Effect": "Allow",
"Principal": {
"AWS": "111122223333"
},
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:us-east-1:444455556666:queue1"
}
}
You can use asterisks to resolve multiple queues, for example:
"Resource": "arn:aws:sqs:us-east-1:444455556666:production-*"
To provide sendMessage permission for all queues starting with production-.
source
share