aws-lambda-ses-forwarder icon indicating copy to clipboard operation
aws-lambda-ses-forwarder copied to clipboard

Invalid Lambda function

Open andrejmaya opened this issue 6 years ago • 4 comments

Hello,

I am in step 6 For the Lambda action: Choose the SesForwarder Lambda function. Leave Invocation Type set to Event and SNS Topic set to [none].. After adding the arn of my lambda function I get a Invalid Lambda function error message and cannot save the rule set.

I already executed this:

aws lambda add-permission \
--region eu-central-1 \
--function-name MyFunctionName \
--statement-id GiveSESPermissionToInvokeFunction \
--principal ses.amazonaws.com \
--action lambda:InvokeFunction \
--source-account 123456789123

but the error message still persists. Any ideas?

andrejmaya avatar Jul 22 '18 05:07 andrejmaya

Stuck on the same issue, did you ever get this to work?

jfl-urbanise avatar Dec 13 '18 08:12 jfl-urbanise

Same. I thought it was a permission issue so I added the invoke policy to the function, but it hasn't worked either: aws lambda add-permission --function-name ses-forwarder --principal ses.amazonaws.com \ --statement-id GiveSESPermissionToInvokeFunction --action "lambda:InvokeFunction" \ --source-account <ACCOUNT-ID>

wahlfeld avatar Dec 23 '18 11:12 wahlfeld

OK it's because your Lambda function is not in the same region as your SES rule. It will also ask you to make an SNS topic if you don't select one, and if there's a permission issue invoking your function it should ask if you want AWS to add the policy for you. If you want to change the policy afterwards, you need to use the CLI such as the command in my previous comment.

wahlfeld avatar Dec 24 '18 01:12 wahlfeld

It worked after I moved the Lambda into the same region as the SES. Thanks for the reply.

jfl-urbanise avatar Jan 07 '19 06:01 jfl-urbanise