Automate adding an email addresses to AWS account suppression list

0

We use AWS SES to send email. Sometimes, we encounter complaints, and we would like automatically add such email addresses to the AWS account suppression list. I would appreciate any help in understanding how to solve this task.

I have SNS topic for complaint notifications. Is it possible to automate adding an email address from an SNS complaint notification to the account suppression list?

2개 답변
0
수락된 답변

Thank you very much for the advice! I did a similar thing: SNS topic and Lambda function listening to it. I extracted the email from the notification and used the 'put_suppressed_destination' Boto3 method to add an email address to the suppression list for my account.

I found the following documentation URLs helpful: https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_PutSuppressedDestination.html https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sesv2/client/put_suppressed_destination.html#

Serg
답변함 2달 전
0

Here's the gist of how you can set it up:

First off, create an SNS topic to catch those complaint notifications. Then, subscribe the SES notification service to this topic. This way, whenever there's a complaint, it'll ping this topic.

Now, when a complaint notification hits this SNS topic, shoot a message over to another SNS topic with the email address that got complained about.

Set up a Lambda function to listen in on this second SNS topic. When it hears about a complained email address, it'll spring into action. The Lambda function's job is to use the ses:AddEmailAddressToSuppressionList API to add that email address to your account's suppression list.

Oh, and if you're feeling fancy, you can also tweak things a bit. For instance, you might want to filter out or process the email addresses before tossing them onto the suppression list. Maybe remove any addresses that have been recently suppressed to keep things tidy.

And there you have it! With this setup, you'll be automating the updating of your suppression list whenever a complaint comes in. No more manual adding of email addresses every time. The SNS topics serve as the link between the SES notifications and the Lambda function that handles the suppression list updates.

profile picture
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠