AWS Lambda not receiving SQS messages due to incorrect event source mapping configuration
I recently switched to I'm having trouble with I'm having trouble with an AWS Lambda function that I set up to process messages from an SQS queue. The Lambda function is not being triggered by the SQS messages, and I'm not sure where the scenario lies. I have set up the event source mapping using the AWS SDK for Python (boto3) like this: ```python import boto3 lambda_client = boto3.client('lambda') sqs_queue_url = 'https://sqs.us-east-1.amazonaws.com/123456789012/my-queue' response = lambda_client.create_event_source_mapping( EventSourceArn=sqs_queue_url, FunctionName='myLambdaFunction', BatchSize=10, Enabled=True ) print(response) ``` When I check the configuration in the AWS console, the mapping appears to be correct. However, after sending several messages to the SQS queue, I am not seeing any logs in CloudWatch for invocations of my Lambda function. I've also verified that the Lambda execution role has the necessary permissions for SQS and CloudWatch. I checked the SQS queue policy and ensured that it allows the Lambda service to poll messages from it. Hereโs what the policy looks like: ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sqs:SendMessage", "Resource": "arn:aws:sqs:us-east-1:123456789012:my-queue" } ] } ``` I've tried re-creating the event source mapping multiple times, checking the IAM roles, and even testing the Lambda function directly, which works correctly when invoked manually. However, I'm still not able to get it to trigger off of SQS messages. Iโm also not seeing any behavior messages in the AWS console that might give a clue as to whatโs going wrong. Any insights or suggestions on how to troubleshoot this would be greatly appreciated! The stack includes Python and several other technologies. I'd love to hear your thoughts on this. This issue appeared after updating to Python 3.9. What's the correct way to implement this? For context: I'm using Python on Windows 10.