Preventing accidental unsubscription from your SNS email notifications

Important SNS emails sent to a group mailing list can be accidentally unsubscribed through the email link. Learn how to prevent that.

AWS
January 5th, 2021
1 min read

I was investigating at work why recently I wasn't receiving any SNS email notifications for some Cloudwatch alarms on a DynamoDb table. I set up these notifications months ago, and while going through the Cloudwatch alarms on the AWS console, I noticed some metrics that should have sent me an email notification through SNS. After investigating the Cloudwatch alarms, which were working ok, I found the issue was with the SNS topic email subscription itself.

The SNS topic called dynamoDbAlerts is used to send any alerts from dynamoDb and other Cloudwatch alarms to a shared email among different team members.

After digging through my email archive, I found an unsubscribe confirmation email buried in my inbox.

Unsubscription email

It turned out that a couple of weeks earlier, maybe someone accidentally clicked on unsubscribe from their email directly, thinking they were cleaning their inbox when in reality, they unintentionally unsubscribed the whole mailing list.

Unsubscription link

I proceeded to delete the previous subscription marked as deleted to fix this issue, and I created the subscription again but confirmed it from the console instead of clicking on the email confirmation link. Doing this through the console or using the cli and adding the flag of --authenticate-on-unsubscribe true will prevent any accidental unsubscription of your topics.

You can read more about it here.