aws-lambda-ses-forwarder
aws-lambda-ses-forwarder copied to clipboard
Invalid Lambda function
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?
Stuck on the same issue, did you ever get this to work?
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>
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.
It worked after I moved the Lambda into the same region as the SES. Thanks for the reply.