Mastering Cloud Cost Optimization Part 2

Developer AWS tools for cost savings

On the previous post of mastering cloud costs optimisation, we talked about the high-level topics that Cloud Experts and FinOps professionals need to keep in mind. Today we are going to focus on developers and the tools they can use when developing or maintaining services

Design and Architecture

It all begins with a simple request: "I want this." As you and your team gather to outline the envisioned system or feature, it's crucial to introduce discussions around cost efficiency and sustainability right from the start. Considerations like performance requirements, anticipated user base, usage patterns, and the necessary fault tolerance become pivotal at this early stage. While these questions may seem straightforward, their importance lies in ensuring we don't overlook the fundamentals. This brings us to the first tool in the process.

AWS Well-Architected Framework

The AWS Well-Architected Framework is a set of best practices and guidelines provided by Amazon Web Services (AWS) to help teams build secure, high-performing, resilient, and efficient infrastructure for their applications. It asks a lot of questions that you might not think of in advance including cost-effectiveness ones. Running the AWS Well-Architected Framework Tool for a workload not yet created provides proactive planning, cost savings, risk mitigation, efficient resource allocation, alignment with best practices, and documentation, and facilitates collaboration, fostering a continuous improvement mindset from the outset. After completing the well-architected framework assessment, you should possess a solid understanding of your system's requirements, anticipated workloads, and have crafted an architecture diagram reflecting that insight and the services intended to be used. This naturally transitions us to the next tool in the process.

AWS Pricing Calculator

The AWS Pricing Calculator is an online tool provided by Amazon Web Services (AWS) that allows you to estimate and calculate the costs associated with deploying and running your service on the AWS cloud. It enables users to configure and customize various AWS services, computing resources, and other components to generate a detailed cost breakdown, helping you understand and plan for your expected expenses based on their specific usage scenarios and requirements. The AWS Pricing Calculator is a tool that challenges architects to estimate the usage associated with using AWS services and thoroughly understand the system they intend to deploy. While it's common to assert, "We don't know how many people will use the service," it's important to note that getting exact estimates may be impossible, but achieving ballpark numbers is not only feasible but crucial for making informed decisions about your AWS architecture. Countless projects could have spared themselves from unexpected setbacks and extensive rework if they had performed a quick estimate based on their architectural plans. In many cases, the calculator reveals that a service a team initially wanted to use isn't the optimal fit for their projected workload.

Launch and Run

Congratulations you and your team have done what 90% of teams don't do. You ran the AWS Well-Architected Framework, you calculated the costs with the AWS Pricing Calculator and now the service is ready to launch and you have two 3 more AWS tools to help you on your journey.

Tags

In the majority of cases, a system deployed in an AWS account is not standalone; rather, it often coexists with various other services and products. In this intricate landscape, tags emerge as essential tools for precisely pinpointing the usage and costs associated with a specific service or product. Tags serve as identifying markers, allowing organizations to categorize and label resources within their AWS environment. By strategically applying tags to individual services or products, users can gain granular insights into usage patterns and associated expenses. This becomes particularly crucial in complex architectures where multiple components interact, ensuring clarity in understanding the contribution of each element to the overall cost structure. In essence, the judicious use of tags becomes a fundamental practice for effective cost management, enabling teams to trace and allocate expenses accurately within the broader AWS ecosystem.

AWS Budgets

AWS Budgets is a service provided by Amazon Web Services (AWS) that allows users to set custom cost and usage budgets that alert them when they are forecasted to exceed predefined thresholds. Now, remember the budget set by stakeholders for the service you used in the AWS Calculator price comparison? Well, the job isn't complete yet. If you've appropriately tagged your system, you can not only establish a budget for the entire AWS account but also create a targeted budget for the specific service you've developed. This specific service budget acts as a proactive monitoring mechanism, notifying you if the service exceeds its predefined threshold. Why is this specific service budget important? It allows for a more nuanced and focused financial management approach. By setting a dedicated budget for each service, you gain the ability to closely monitor and control expenses at a granular level. This ensures that resources are allocated efficiently, and potential overspending is promptly identified, providing greater financial transparency and accountability within your AWS environment. In essence, strategic tagging and service-specific budgets contribute to a more robust and precise cost management strategy.

AWS Compute Optimizer

So, your service has been running for a while, and you've been diligently monitoring its performance. Typically, in the early stages, developers may tend to over-provision the service to err on the side of caution. Alternatively, as time progresses, code efficiency improvements may have been implemented. Enter AWS Compute Optimizer. AWS Compute Optimizer is a valuable tool that analyzes the historical utilization of your Amazon EC2 instances and other AWS resources, such as Amazon RDS databases and Amazon Lambda functions. It helps you rightsize your instances and resources by providing recommendations based on the observed performance patterns. Whether your service started with cautious over-provisioning or has undergone efficiency enhancements, Compute Optimizer aids in optimizing resource utilization across various AWS services. This iterative optimization process supports cost-effectiveness while maintaining optimal performance levels for your AWS services.

Saving Plans and Reserve Instances Recommendations

In the final phase, when your service is stable, usage has normalized, and most issues are resolved, the AWS Cost Explorer tool steps in. At this point, when the optimizer no longer provides recommendations, it's time to explore Reserved Instances and Savings Plans. Rather than manually calculating, AWS Cost Explorer simplifies the process by providing detailed recommendations. All you need to do is review and act on the suggestions, making it seamless to reserve instances and leverage savings plans. This strategic move ensures ongoing cost efficiency and maximizes savings while maintaining the stability of your service.

Summary

In conclusion, cloud cost optimization involves a comprehensive approach that extends from the initial design phase to ongoing operational efficiency. Developers play a pivotal role in this process by leveraging key tools such as the AWS Well-Architected Framework for proactive planning, the Pricing Calculator for cost estimation, and Tags for precise expense tracking. As services launch and stabilize, AWS Budgets provides nuanced financial control, while AWS Compute Optimizer ensures ongoing resource optimization. The journey concludes with AWS Cost Explorer, simplifying Reserved Instances and Savings Plans recommendations for sustained cost efficiency. It's worth noting that while there are other tools designed for a more cross-account and organizational approach, the ones mentioned—AWS Well-Architected Framework, Pricing Calculator, Tags, AWS Budgets, AWS Compute Optimizer, and AWS Cost Explorer with a focus on Reserved Instances and Savings Plans—are foundational tools that developers should be familiar with. These tools empower developers to actively contribute to cost-effective and well-architected AWS environments, aligning resources with performance requirements and business objectives.

Posted by Mikhael Santos on Febuary 15, 2024