Linux | Cloud | DevOps | Scripting

Breaking

Monday, 29 July 2019

Set AWS Billing Alert


We can monitor our estimated AWS charges by using Amazon CloudWatch. The alarm triggers when our account billing exceeds the threshold we specified.

Step 1: Enable Billing Alerts:

AWS ➔ click on root account ➔ My Billing Dashboard ➔ Billing preferences ➔ [*] Receive billing alerts ➔ Save preferences.

Step 2: Configure CloudWatch:

AWS ➔ Services ➔ CloudWatch ➔ Billing ➔ Create alarm…

Create Alarm
Fig: Create Alarm
➔ Select metric ➔ select Billing ➔ there are two options 1. By service and 2. By total estimated charges. I am using 'Total Estimated Charge'…

Select Metric
Fig: Select Metric
…➔ tick on USD ➔ Select Metric ➔ Metric name: EstimatedCharges ➔ Currency: USD ➔ Statistic: Maximum ➔ Period: 6 hours ➔

Configure Metric
Fig: Configure Metric
Conditions ➔ Threshold type: Static ➔ Whenever EstimatedCharges is: Greater/Equal ➔ than: 10 USD ➔ Next ➔...

Threshold Conditions
Fig: Threshold Conditions

…Alarm state: in Alarm ➔ Select an SNS topic: Create new topic ➔ Topic name: Default_CloudWatch_Alarms_Topic ➔ Email endpoints that will receive the notification: divakar.rastogi@gmail.com ➔ Create Topic (this time AWS will send an e-mail to us for confirmation from your e-mail account) ➔ (we can add more notifications by clicking on 'Add notification') ➔ Next.

Define Alert Name and Description:

Alert Name: Charges Exceed ➔ Alarm Description: Provide any description for your Alarm set ➔ Next ➔ Review everything in Preview and create section ➔ Create alarm.

As we click on Create alarm, we will see our configured alarm has been created.

Alarm Status
Fig: Alarm Status
But we can see that the alarm is pending for confirmation. So, verify the account from your e-mail account.

Step 3: Verify alarm from e-mail account:

Open the mail received from AWS… ➔

Notification e-mail
Fig: Notification e-mail

As we click on 'Confirm Subscription', AWS sends us a notification that 'Subscription confirmed'.

Confirmation from AWS
Fig: Confirmation from AWS

We can verify this in SNS subscription also:

Verify from SNS subscription
FIg: Verify from SNS subscription

Enjoy!



No comments:

Post a Comment

Pages