Skip to content

nopp/webhook-ses-bounce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhook SES Bouce - AWS Lambda function

Send SES bounces to DynamoDB

1) Create an Amazon DynamoDB with keys:

Partition Key: email(string) and Sort Key: timestamp(string)

2) Create an Amazon Lambda function

Edit the table name and region on bounce.go

Region: aws.String("sa-east-1") TableName: aws.String("prod-sesBounces")

Lambda role:

  {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ReadWriteTable",
            "Effect": "Allow",
            "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetItem",
                "dynamodb:Query",
                "dynamodb:Scan",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem"
            ],
            "Resource": "arn:aws:dynamodb:*:*:table/prod-sesBounces"
        },
        {
            "Sid": "CreateLogGroup",
            "Effect": "Allow",
            "Action": "logs:CreateLogGroup",
            "Resource": "*"
        }
    ]
}

3) Create an Amazon SNS Topic with subscription to Lambda.

4) Enable on Amazon SES

Bounce Notifications SNS Topic:

5) To publish on Amazon Lambda

make && make install

Releases

No releases published

Packages

No packages published