(upbeat music)
- Hello, I'm Olajide
a cloud Support Engineer here
at the AWS office in Cape Town.
Sometimes customers tell me that
they are a member of a mailing list
and their email spam filter
chooses the unsubscribe link.
Then the email address of the mailing list
is unsubscribed from an SNS topic.
After that, everyone on the mailing list
gets an unsubscribe confirmation message,
which can be unexpected.
This situation happens
because when everyone
on the mailing list clicks
on the unsubscribe confirmation message,
then everyone on the list
is unsubscribed from the mailing list.
So today, I'll be showing you various methods
and ways of avoiding this situation.
Let's get started.
The first thing to do
is to delete the existing subscription,
and then replace it
with one that requires authentication to unsubscribe.
To delete a subscription,
open up an AWS Console
where I've logged on.
Navigate to the Simple Notification Service.
Navigate to the left navigation panel
and choose subscriptions.
On the subscriptions page,
locate my confirmed email subscription,
and then choose Delete.
Here, you'll see a delete subscription dialog box,
I proceed to choose Delete,
the subscription should be deleted.
To confirm if the subscription has been deleted,
I navigate to the topics panel
by choosing my topic.
Here you would observe
that my subscription
has been deleted under the subscriptions tab.
You will use either of the following methods
to set up the new subscription.
It is important to have access
to the subscription confirmation email message,
to confirm a new subscription
and complete the setup.
If you are subscribing
a mailing list to your topic,
add your own email address
to the mailing list first,
so that you can confirm the subscription.
I will now proceed to set up
the email subscription
that requires authentication to unsubscribe.
On the Amazon SNS Console,
I navigate to the topics panel,
locate my SNS topic.
Locates the Create subscriptions button.
Here, select Email as the protocol
and on the endpoint field,
add your email mailing list
and choose create subscription.
Notice that your SNS subscription
is in the pending confirmation state.
Navigate to the mailbox to find
the subscription confirmation message
from AWS notifications.
The SNS Sender ID is usually noreply@sns.amazonaws.com.
Remember that we do not yet confirm
the subscription using the link
in the subscription confirmation email.
Copy the URL from
the confirm subscription link
to your clipboard.
I've already done this.
Navigate to the subscription panel
of the SNS console.
Here select the subscription
that's pending confirmation.
Navigate to the confirm subscription button.
A confirm subscription dialog box appears.
Paste in the subscription confirmation URL,
choose confirm subscription.
Notice that any recipients subscribes
to the mailing list won't be able
to unsubscribe the mailing list
from the SNS topic.
They would get the following error
if they tried to do so.
The second step
is to set up an email subscription
that requires authentication to unsubscribe,
you do this using the AWS CLA.
It is important to have the AWS CLA
installed Before you go
to the second step,
you can download it here.
Let's open the AWS CLA
where I'm logged on
with my access key and secret key.
In the AWS CLA window,
run this command and hit Enter.
I've already pasted this command.
In the second command, replace
the value of region
with the AWS region of your topic.
With this command,
I'll be subscribing the endpoint
to the SNS topic.
Replace the value of region
with the AWS region of your SNS topic,
replace the values of the topic Arn,
with the topic Arn from the clipboard.
Replace the notification endpoints
with an email address
to be subscribed to
the SNS topic and hit Enter.
Navigate to the mailbox to find
the subscription confirmation message
from AWS notifications.
The SNS Sender ID is usually noreply@sns.amazonaws.com.
Remember that we do not yet confirm
the subscription using
the link in the subscription confirmation email.
Let's copy the URL from
the confirm subscription link
to the clipboard.
Paste the URL into a text editor,
and then copy the token.
A token is a long series
of numbers and letters
in the middle of the URL.
After a token,
with the equals to sign
and before endpoint
with the equals to sign.
For example, run this command using
the token you copied
and the same topic Arn,
from earlier and hit Enter.
Notice that your subscription
has been successfully subscribed
to your SNS topic.
Thanks for watching
and happy cloud computing,
from all of us here at AWS.
(upbeat music)