Setting Up Notifications – Ensuring Cost Optimization – SAP-C02 Study Guide

Setting Up Notifications

The last piece of the puzzle is enabling and configuring notifications for your billing alerts and alarms. This is important for a number of reasons, such as cost management, security, and creating automated workflows. This can also be achieved with a few simple clicks from the AWS Management Console:

  1. To get started, log in to the AWS Management Console and launch Amazon Simple Notification Service (SNS) using the following URL: https://packt.link/6Q1U7.
  2. Once done, select the Topics option from the navigation pane.
  3. On the Topics page, click on Create topic to get started.
  4. On the Create topic page, select either a FIFO (First in First out) topic, which guarantees message ordering, or a Standard topic, which performs message ordering on a best-effort basis. It’s best to select the Standard topic, which will provide you with multiple endpoint options to subscribe to, such as Amazon Kinesis Data Firehose, AWS Lambda, email, HTTP, SMS, and so on. With the FIFO (First in First out) topic, you can only select Amazon SQS as a subscription.
  5. Once selected, provide a suitable name for your topic, followed by an optional display name.

That’s pretty much it!

  • With all the settings completed, click on Create topic to complete the process.
  • Now, from your newly created Topic page itself, select the Create subscription option provided under the Subscriptions tab.
  • On the Create subscription page, start by selecting the newly created topic from the Topic ARN drop-down list.
  • Next, select the appropriate protocol for your notification delivery. For this example, select Email as the default protocol and provide the FinOps team’s email address in Endpoint, as shown in Figure 4.6:

Figure 4.6: Billing notification configuration using Amazon SNS

  1. Once completed, select the Create subscription option to complete the process.

Note

You will need to confirm the subscription using the provided endpoint (email ID in this case) once the subscription is created.

You could also create additional subscriptions under the same topic for other AWS billing- and pricing-related news and information, such as notifications of when the price of a service changes and so on.

To do so, simply follow the same steps as before while creating a subscription, with the only exception being the custom topic ARN for any AWS service-related pricing changes, which is arn:aws:sns:us-east-1:1234567890:price-list-api.

Viewing Reports

The last and perhaps most important part of any cost optimization exercise is to continuously measure and monitor the overall consumption of resources across your AWS environments, and this can be achieved with the help of granular reports generated using AWS Cost Explorer.

AWS Cost Explorer provides you with out-of-the-box reports with insights into the most common usage and spending patterns, such as Daily costs, Monthly costs by service, Reserved Instance report, and Monthly EC2 running hours costs. Each of these default reports is non-editable; however, you can use them as boilerplates to create your very own custom reports too:

  1. To view the default reports, sign in to the AWS Management Console and go to the following URL: https://packt.link/4Avly.
  2. Next, select the Reports option from the navigation pane to view a list of pre-created, default reports.
  3. Select the Monthly costs by service report to get started.
  4. On the Cost Explorer page, use the various filters to filter by the usage of AWS resources across your accounts, Regions, and in some cases, even Availability Zones. You can also group the graphs as per your requirements by selecting the More option.

Figure 4.7: Cost Explorer “Monthly costs by service” view

  • Once done, save the report using either the Save as… option provided or, alternatively, download the data in the form of a CSV. You can use other AWS services such as Amazon Athena or Amazon QuickSight to create further fine-grained reports using these CSVs and share them across your organization as well.

Summary

This chapter started off by discussing a few key cost-optimization principles that are essential for any and all organizations to follow in order to understand, manage, and forecast costs on the cloud. You then reviewed some tagging best practices and strategies, as well as diving into how you can enable and configure cost allocation tags using AWS Tag Editor. Finally, you learned how to further optimize costs by setting up simple alarms, alerts, notifications, and reports using various AWS services.

In Chapter 5, Determining Security Requirements and Controls, you will explore how to control access to resources across multiple AWS accounts in your organization, including how to apply security and compliance controls and go through the measures and the AWS services.

Further Reading

  • Cost optimization – Well-Architected Framework: https://packt.link/KxO91
  • AWS cost categories: https://packt.link/4yx6X