AWS Serverless Application: Store SES bounces, complaints and deliveries to DynamoDB
- Amazon SES send notifications about your bounces, complaints, and deliveries to Amazon SNS
- Invoking AWS Lambda functions via Amazon SNS
- Write to the Amazon DynamoDB
- SES
- SNS Topic
- lambda (python3.7)
- DynamoDB
$ aws sns create-topic --name ses-messages --region us-east-1
Select a destination type, and then choose above SNS Topic.
※ You can only select Amazon SNS topics that are present in the AWS Region that you're currently using for Amazon SES.
$ aws dynamodb create-table --cli-input-json file://dynamodb_table.json
$ S3_BUCKET=sam-app-artifacts \
TABLE_SES_NOTIFICATIONS=SESNotifications \
SNS_TOPIC_ARN=arn:aws:sns:us-east-1:xxx:ses-messages \
make deploy
S3_BUCKET
s3 bucket for lambda source codeTABLE_SES_NOTIFICATIONS
dynamodb table nameSNS_TOPIC_ARN
created sns topic
$ S3_BUCKET=sam-app-artifacts \
TABLE_SES_NOTIFICATIONS=SESNotifications \
SNS_TOPIC_ARN=arn:aws:sns:us-east-1:xxx:ses-messages \
make deploy
Default schema (dynamodb_table.json
) does not use GSI.
Create index yourself, if you want.
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-sns-ses-dynamodb/?nc1=h_ls