Stop SNS from sending emails


I had a Lambda function send a test message to an SNS topic to be emailed to two email addresses. It somehow created an infinite loop, and I'm getting 10-20 emails per minute. I deleted the Lambda function and the SNS topic, but the emails keep coming. The SNS topic's subscriptions to the two emails cannot be deleted because they are listed as "Pending confirmation". I tried deleting and unsubscribing them with CLI, but it says that it cannot delete or unsubscribe subscriptions that are "Pending confirmation." Any suggestions on how to stop these emails?

1 Answer

The problem was created by "an SNS triggering the Lambda function and the Lambda function publishing to the same SNS topic. For example, SNSTopicOne => LambdaFunction => SNSTopicOne."

Apparently, according to AWS support, the email messages were put into queue before I deleted the Lambda function and it just took a long time for the queue to be cleared. Support may have cleared the queue manually at some point. Nice to have this resolved since I received a few thousand emails!

answered 17 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions