How to create a log file with all SES email sending events

0

We are using SES free version for sending out regular emails to our 130 volunteers and would like to create a log file (or table) with all email related events (sent, delivered, bounced), similar to what we had when sending with mailjet.com smtp relay. Is that possible, i.e. in Cloudwatch, within a free account or would we need a paid account for 1000 plus USD per month?

1 個回答
1

First, explore the options available to you in the documentation: https://docs.aws.amazon.com/ses/latest/dg/monitor-sending-activity.html

When configuring your SES configuration set with CloudWatch as the event destination you need to define the dimensions that you wish to capture as metrics (the documentation has a walk-through of how to do this). This can be more convenient as it allows you to be more intentional of the type of information you find valuable to capture and you don't need to worry about processing the raw data, but it does require more planning.

Since it sounds like you just want the raw event details in CloudWatch Logs, a simple and cost-effective way to accomplish this is to create an SES configuration set event destination to an Amazon SNS topic, and then create a Lambda function with the SNS topic as the trigger. The function code only needs to print/log the event that is passed into the Lambda function. e.g. in Python it would be: print(event). You can have additional subscribers to the SNS topic, so for example you can receive emails of the events if you are still evaluating the ways in which you would like to process the data.

You can also have multiple event destinations for each SES configuration set, so you can evaluate all of the options that are presented in the documentation to determine which best meets your objectives.

Here are links to the pricing details. Depending on your volume and what you choose to configure, you may be able to stay within the free tiers as outlined for each service. Nevertheless, it's best practice to set up a billing alarm so that you are alerted whenever estimated costs begin to exceed your level of tolerance.

https://aws.amazon.com/sns/pricing/

https://aws.amazon.com/cloudwatch/pricing/

https://aws.amazon.com/lambda/pricing/

https://aws.amazon.com/ses/pricing/

AWS
Jesse_T
已回答 2 年前
profile picture
專家
已審閱 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南