Automated analysis of cost and usage of your AWS resources – Adhering to AWS Well-Architected Principles

AWS services that are relevant for implementing this functionality are Amazon CloudWatch, AWS CUR, AWS Lambda, and Amazon Simple Storage Service (S3 ). The cost analysis logic can be customized based on specific requirements, and the solution can also be extended to send out automated notifications, or emails, if necessary:

Figure 12.5: Automated analysis of cost and usage reports in AWS

Let’s look at this in a bit more detail, as follows:

  1. AWS CUR provides a comprehensive report collecting the cost and usage data across several accounts. These reports can be automatically published up to three times a day into a destination such as an Amazon S3 bucket.
  2. Amazon CloudWatch rules can be configured to trigger at a pre-defined time of day, depending on your use case. You might want to process these records daily, or maybe on a weekly or monthly basis. Alternatively, one could also define S3 event notifications to automatically trigger a Lambda function as soon as an object is uploaded. These CloudWatch rule triggers are usually configured to invoke a pre-deployed Lambda function that has the necessary permissions to pull and process data from the S3 storage bucket in question.
  3. The Lambda function pulls the recent reports, parses the CSV records, and derives additional insights from the raw data, converting it into actionable information. This processed information might support the creation of visuals, graphs, or any other form of insight that can then help your teams understand the cost impact of the decisions they are making.
  4. After the insights are prepared, they can be shared with the relevant teams over email or other forms of notifications.

Building sustainable workloads in the cloud

The Sustainability pillar of the AWS Well-Architected Framework focuses on controlling and reducing the environmental effects of cloud resources that your applications consume. Just as with security, this is also a shared responsibility model where AWS focuses on using renewable sources for data center energy requirements, and users are expected to do their part, by avoiding wastage and carrying out architectural improvements when possible. From the users’ perspective, it mostly comes down to the reduction of resources and maximum utilization of what is available.

As with the other pillars, there are also a few sustainability best practices, which we will cover next.

Best practices for making cloud environments sustainable

These practices focus on the indirect emissions that users can help reduce since AWS has little control over how you manage your workloads and the kind of resource consumption it results in. The actual consumption depends on the type of AWS services that the customers use, the energy requirements of those services, and finally the energy requirements of the data center to continue running those workloads.

Deriving actionable KPIs from your usage patterns

First and foremost, users need to understand and measure the impact of their cloud workloads by including all forms of impact, including how the end customers use their products and what the entire lifecycle leading to resource decommissioning looks like. Once the measurements are in place, it becomes easy to derive the energy requirements per unit of work and then work toward reducing that requirement through efficient architectural design and usage of AWS cloud resources.

Leave a Reply

Your email address will not be published. Required fields are marked *