Posted On: Sep 30, 2021
AWS Lambda now allows customers to trigger functions from Amazon Simple Queue Service (Amazon SQS) queues that are in a different AWS account. Previously, customers could trigger Lambda functions from SQS queues in the same account only. Starting today, customers can create Lambda functions in multiple AWS accounts without needing to replicate the event source in each account.
To get started, customers can select Amazon SQS as their event source when adding a trigger for their Lambda function, and then provide the Amazon Resource Name (ARN) for their SQS queue in any AWS account. The Lambda function will need permissions to manage messages in the SQS queue, which can be handled by updating the function’s execution role permissions. The SQS queue will also need to grant cross-account permissions to Lambda in order to allow the function to process messages from the queue.
This functionality is available in all AWS Regions where Amazon SQS is supported as an event source for AWS Lambda. This feature requires no additional charge to use. Both the Lambda function and the SQS queue must be in the same region, though they can be in different accounts. To learn more about using SQS as an event source for Lambda using different accounts, read the Lambda Developer Guide.