(upbeat pop music)
- Hello, I am Anirudh, a Cloud Support Engineer,
here at AWS office in Banglore, India.
Today, I'm going to show you how to configure
a SMS spend limit alarm.
Let's get started.
The default spend limit for the AWS account
per region is $1.
As soon as the spend limit is reached,
SNS stops sending the SMS messages.
That means SMS messages are not delivered to the endpoints.
You can be notified when we reach a particular
SNS-SMS spending threshold
before hitting the actual limit of your account.
For example, you can be notified when you reach
just $0.5 when $1 is the actual limit of the account.
When you actually hit the limit,
you can get your SNS-SMS account spend limit raised
done by opening a limit increase case with AWS support.
Let's see how we can use CloudWatch Alarm on the SNS Metric
to get us notified before it actually gets hit.
As you can see, I have logged into AWS Management Console.
Now, we will navigate to SNS console.
Here we will create a SNS topic
and subscription for this topic.
Select topics in this left notification pane.
Now, select create topic.
Enter your topic name, for example,
SMS monthly spend topic.
Now, select create topic.
We see that the SNS topic with name
SMSMonthlySpendTopic has been created.
Now, select the subscriptions under this topic.
Select create subscription.
Here we will select the protocol email.
I will enter my email address under the endpoint section.
Select create subscription.
Now, we see that the email subscription is created
for this topic, but it is in pending confirmation state.
The email address must be confirmed,
so that it can start receiving notifications
that are published to SNS topic that was created.
Now, I'm going to my mailbox,
and select the confirmation mail sent to my mail address.
Now we see that the email subscription
is in confirmed state,
that is, it is now ready to receive the SNS notification
sent to this SNS topic.
Let's navigate to CloudWatch console now.
Select alarms, and then choose create alarm.
Now, go to select metric.
You will look for the required metrics.
In a metric with no dimensions,
we have to select SMSMonthToDateSpentUSD.
Click on select metric.
Now, here we define the configuration of a CloudWatch alarm.
Let the statistic be average, period be five minutes,
and set threshold type as static.
Define the alarm condition as greater than/equal to.
Enter the value, for example, let's do $0.5.
Select next.
Now we select the SNS topic that we created earlier.
Then, select next.
Now, let's give an alarm name, and a description.
Now select next.
Finally, select create alarm.
Our alarm is configured,
and now, while sending SMS messages,
when you reach $0.5 limit, your alarm will trigger,
and you'll receive notification like this.
Thanks for watching, and happy cloud computing
from all of us here at AWS.
(upbeat pop music)