Some useful settings for Amazon SNS + CloudWatch email notifications
Hello, this is UZI from the System Solutions Department.
This is the theme of this blog
● Disabling unsubscribe settings for SNS topics
It's about.
For example, suppose you have specified email as the notification destination for a subscription set in an SNS topic. If you set this SNS topic as the alarm notification destination for CloudWatch metrics, AWS will send you an email notification if there is an abnormality in the metrics.
This time, we will introduce settings to prevent email notifications from being accidentally disabled (unsubscribed) if they are enabled (subscription status).
What is unsubscribe?
Unsubscribe means to cancel the subscription set to the SNS topic.
Specifically, simply clicking the link in the red frame in the email will cancel your subscription
● Emails from SNS topics
● Subscription canceled screen
Problems caused by being unsubscribed
If someone presses the button by mistake, they will never receive notifications unless they subscribe again.
What if you received a notification email informing you that because you canceled the service by mistake, there was a delay in discovering an abnormality in your content, or that you were charged a pay-as-you-go charge?
When you look at the opportunity costs for your customers and the bill from AWS, you can end up with a huge amount of charges that can be scary.
● Before canceling subscription
The ID is displayed before the subscription is canceled.
● After cancellation...
Shows as deleted
● Cancellation notification email
A subscription cancellation notice will also be sent to you via email. (A little kind)
Resubscribe in that email , your subscription will be re-registered.
● Screen after resubscribing
Disable unsubscribe setting
Now, this is a long introduction, but let's move on to the main topic, how to disable unsubscribe
You will probably receive a confirmation email to the email address you specified as the endpoint when creating your subscription.
Copy the Confirm subscription link in the email instead of clicking
Then select the subscription you are about to create (pending confirmation status), click Confirm Subscription, and a Confirm Subscription pop-up will appear.
Paste the URL you copied there and click Confirm Subscription.
・
・
・
you can now disable unsubscribe !
If you actually issue a message from the subscription section and press the unsubscribe link in the email you receive...
“Unable to unsubscribe” will be displayed as shown in the image 👏👏
Disable settings for existing SNS topics
Unfortunately, it seems that it is not possible to switch to the unsubscribe setting for existing SNS subscriptions...
There seem to be two alternatives as follows:
Details are introduced in the article below, so if you are interested, please take a look!
- Delete existing SNS subscriptions → Create new SNS subscriptions as soon as possible
- Temporarily add an SNS subscription for another endpoint and receive a notification while "Delete → New" is in progress.
○ Reference: SNS topic cannot have multiple SNS subscriptions with the same endpoint associated
summary
This concludes our introduction to the settings for disabling unsubscribe for SNS topics.
We hope this will be helpful when building and monitoring settings using SNS on AWS.
See you then