Reputation: 2599
I'm working on a lambda function which needs to process .csv files attached to incoming emails. I already have my domain verified with Amazon SES. I've created a new ruleset with just one rule for triggering the lambda. I've added one email in recipient condition for this rule and gave SES the permission to invoke the lambda.
But this is not working, the lambda is not getting invoked no matter how many emails I receive. Am I missing anything here?
Upvotes: 0
Views: 590
Reputation: 69
Although additional information would be helpful, the below steps should cover most scenarios:
domain
verified with MX records setup at your DNS provider (you must own the domain you are receiving emails to. I.e. @gmail.com won't work)value
of the MX record if your lambda and ses is in us-east-1. Change that to your specific region. List of supported regions 10 inbound-smtp.us-east-1.amazonaws.com
IMPORTANT: Straight from AWS docs: "...all of the AWS resources that you use for receiving email with Amazon SES have to be in the same AWS Region as the Amazon SES endpoint. For example, if you use Amazon SES in the US West (Oregon) Region, then any Amazon SNS topics, AWS KMS keys, and Lambda functions that you use also have to be in the US West (Oregon) Region. Similarly, to receive email with Amazon SES within a Region, you have to create an active receipt rule set in that Region."
resources:
Resources:
GiveSESPermissionToInvokeMyfunctionLambdaFunction:
Type: AWS::Lambda::Permission
Properties:
FunctionName: { "Fn::GetAtt": [ "MyfunctionLambdaFunction", "Arn" ] }
Principal: ses.amazonaws.com
Action: 'lambda:InvokeFunction'
SourceAccount: { Ref: AWS::AccountId }
Upvotes: 1