Amazon SES invokes Lambda not working, not able to debug

0

I am configuring a rule in Amazon SES to auto invoke a lambda function whenever my recipient of "support@my-domain.org" receives an email. I configured all permissions there but my lambda has never been invoked. how to debug ?

I have done everything mentioned in https://repost.aws/questions/QUUrBYLXVJTt-7yll1sV6rYQ/invoking-lambda-function-on-receiving-email-by-ses

1 Answer
0

Firstly, confirm that you have the following settings correctly configured:

SES Email Receiving: Make sure that you have set up an SES email receiving rule for "support@my-domain.org". This rule should trigger the Lambda function.

Lambda permissions: Your Lambda function must have a policy that allows Amazon SES to invoke the function. Make sure the AWSLambdaBasicExecutionRole is attached, which gives the function permissions to write logs to CloudWatch Logs.

SES permissions: Amazon SES must have permissions to execute the Lambda function. This is done by adding a policy to the resource-based policy of your Lambda function.

After confirming these, here are some steps to debug the issue:

Step 1: Check the CloudWatch logs AWS Lambda automatically monitors Lambda functions on your behalf, reporting metrics through Amazon CloudWatch. To help you troubleshoot failures in a function, Lambda logs all requests handled by your function and also automatically stores logs generated by your code through Amazon CloudWatch Logs.

Step 2: Use Amazon SES Test Use the "Send a Test Email" feature of Amazon SES to send an email to "support@my-domain.org". Check if the Lambda function is triggered.

Step 3: Check the Rule Set Make sure the rule that you created is in the Active Rule Set. If it's not, it won't be triggered.

Step 4: Check Rule Order If you have multiple rules, check the order of the rules. Amazon SES applies rule sets in the order in which they are listed. When Amazon SES finds a rule that matches an incoming message, it stops evaluating the message and applies the rule.

Step 5: Verify S3 or SNS actions If your rule includes an S3 or SNS action, but the Lambda action is not being triggered, the issue might be with the S3 or SNS action. You need to verify these actions are correctly configured.

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions