Monitoring with Alerts, Notifications, and Reports – Ensuring Cost Optimization – SAP-C02 Study Guide

Monitoring with Alerts, Notifications, and Reports

Now you have selected the necessary tags and enforced a tagging strategy for your workloads on AWS. In this section, you will now look at how to use these tagging mechanisms to generate simple billing alerts, notifications, and reports using AWS tools and services.

First, you will learn how to create a fairly simple billing alarm using Amazon CloudWatch. But before that, there are a few prerequisite steps that you need to complete, starting with enabling billing alerts.

Enabling Billing Alerts

Before you go ahead and create billing alarms using Amazon CloudWatch, first enable billing alerts using the AWS Billing console by following these steps:

  1. Sign in to the AWS Management Console and launch the AWS Billing dashboard using the following link: https://packt.link/BeKTf.
  2. Next, select the Billing Preferences option from the navigation pane on the left.
  3. Click on the checkbox next to the Receive billing alerts option and click on Save preferences to complete the process, as shown in the following screenshot:

Figure 4.4: Enabling billing alerts using the AWS Billing dashboard

Creating a Billing Alarm

Once the billing alerts are enabled, the next step in the process is to create a simple billing alarm using Amazon CloudWatch. Follow these steps to do this:

  1. Launch the Amazon CloudWatch console using the following link: https://packt.link/43h8J. Ensure that your Region is set to US East (N. Virginia) before you carry on with the next steps.

Note

All billing data is consolidated and stored in the US East (N. Virginia) Region.

  • Next, from the navigation pane, select the Alarms option and then click on All Alarms.
  • Click on the Create alarm option.
  • On the Specify metric and conditions page, click on Select metric and then use the Metrics search field to search for billing-related metrics as shown:

Figure 4.5: Total estimate billing alarm configuration

  • Select the Billing > Total Estimated Charge metric to continue.
  • Finally, select the currency as USD and click on Select metric to complete the process.
  • Once again, on the Specify metric and conditions page, provide a suitable Threshold value against which your billing alarm monitors and triggers. This example sets the alarm to trigger if the threshold value of $500 is crossed for a period of 6 hours; you can configure the values and conditions here as per your requirements.
  • Once the thresholds are set, select Next to configure an SNS topic to send out notifications in case the alarm is in a triggered state. You can choose to create a new SNS topic here as well.
  • Once completed, click on Next to provide a suitable name and description for your alarm, and there you have it! Your very own billing alarm has been created using just a few simple steps!