Why Engineers Hold the Keys to Smart Cloud Spending
Explore how engineers play a crucial role in optimizing AWS cloud spending, common optimization levers and tools that engineers can pull to save significant spend.
(Movie narrator voice) In a world powered by digital innovation, where cloud spend is out of control, one team of unsung heroes hold the keys to successful AWS cost optimization: Finance.
(Record Scratch) Wait no, that’s not right. It’s actually YOU – the engineers!
This blog will delve into the pivotal role that engineers play in driving intelligent AWS spending. I will offer some in-depth exploration of optimization plays for developers, as well as outline actionable strategies that engineers can seamlessly integrate into their development workflow.
Worst case is you read the blog and learn something! You might even get a couple laughs along the way. Best case is that I sell you on the value of optimization. Your mission, should you choose to accept it, will be to turn my advice into actual savings for your organization.
Take a break from the coding and listen to me ramble for a minute. In the context of AWS cloud spending, the engineering role extends beyond just crafting functional code. Developers are now stewards of cost optimization, ensuring that the technological strides they make align harmoniously with financial prudence. That’s the fanciest sentence of the entire blog, I promise.
Successful engineers shift their mindset from “just code” to “code plus cost”. Transitioning from a singular focus on code quality to a broader perspective that encompasses cost implications has become hallmark of the modern engineer. Developers must recognize that the efficiency of their code directly influences AWS spending.
Empowering engineers with an intimate understanding of AWS's complex cost structure equips them with the tools needed to make informed decisions. These decisions have a direct impact to the bottom line. By architecting applications that maximize resource utilization, minimize waste, and scale elastically, they can influence substantial (and sometimes perpetual) financial savings, as well as more efficient cloud usage. These are some of the metrics that folks up your management chain will care about as well!
I had a feeling… it’s an easy sell. Both AWS are customers are aligned – run as efficiently as possible to gain as much value as you can from AWS.
There are MANY ways you can optimize, just do a quick google search and you will see there are optimization recommendations EVERYWHERE.
For this blog, I’ll list the first 5 common optimization levers (that pop into my head) that engineers can pull to save significant spend:
Right Sizing Instances: Right sizing is the process of matching instance types and sizes to your workload performance and capacity requirements at the lowest possible cost. Ideally this would be done before ever launching the instance, but sometimes you need to see the actual performance of the instance to be able to accurately measure metrics. I am also counting terminating idle instances as a Right sizing opportunity, so go check and see if there’s anything running that shouldn’t be!
Leveraging Spot Instances: Spot Instances offer cost-effective compute capacity for fault-tolerant and flexible workloads. Engineers can design applications to leverage Spot Instances where possible, optimizing costs while still meeting performance requirements. Spot Instances work well for big data, containerized workloads, CI/CD, stateless web servers, high performance computing (HPC), and rendering workloads. Reminder – there’s no bidding for spot anymore.
Storage Tiers and Lifecycle Policies: By implementing storage tiering and lifecycle policies, engineers can move data between different storage classes based on access patterns, optimizing costs while ensuring data availability. If those access patterns are dynamic, you can use S3 Intelligent Tiering. Amazon S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective access tier when access patterns change. See below for an Intelligent Tiering breakdown:
Serverless Architectures: Embracing serverless (and modernized) architectures eliminates the need to manage infrastructure, leading to cost savings through billing based on actual usage (and not just because a server is running). Also, who wants to manage servers anyway? What’s next, will I have to power my own servers?! I’m trying to get out of the data center business and into the cloud business!
Reserved Instances and Savings Plans: Engineers can optimize costs by strategically utilizing Reserved Instances and Savings Plans to reserve capacity for predictable workloads, getting significant discounts compared to on-demand pricing. As a best practice, right size and modernize your environment first, so when you move out of the more ‘technical’ levers, you can make a better decision on the commercial levers.
BONUS ROUND – Who doesn’t love a good bonus? Check out our AWS Graviton based instances, which can provide up to 40% better price performance over compatible current generation x86 instances. The public website has a footnote, I better include it here too - 20% lower cost and up to 40% higher performance for M6g, C6g, and R6g instances over M5, C5, and R5 instances respectively, based on internal testing of workloads with varying characteristics of compute and memory requirements.
There’s plenty of other best practices around data transfer, Sagemaker, databases, Auto Scaling Groups, and more. Take a look around the AWS whitepapers and documentation to learn more about optimization!
Absolutely! You can incorporate cost optimization into your daily work using a range of AWS tools! I won’t go over all of them, but sticking with the theme from before, let’s roll through the first 5 I think of:
- AWS Cost Explorer: Cost Explorer offers interactive visualizations of cost and usage data, enabling engineers to identify spend trends and opportunities for optimization. See the screenshot below for a sample report showing EC2 Spend by Instance Type:
AWS Budgets: Engineers can set custom budgets and receive alerts when costs exceed predefined thresholds, fostering proactive cost management. In some cases, you can even automate an action to be taken once a threshold is crossed (I.E. turn off an EC2 instance).
AWS Cost Anomaly Detection: This tool employs machine learning to detect and notify engineers about unusual spending patterns, enabling swift corrective action. This is similar to budgets, but different in terms of when you get alerted. See the below screenshot:
AWS Compute Optimizer: Focused on compute resources, Compute Optimizer offers recommendations to improve resource utilization, aiding engineers in optimizing instance types and sizes. You can even now integrate your Application Performance Management data to get a more holistic picture of what’s running in your environment.
AWS Cost and Usage Report – the most detailed billing artifact you can get. Once enabled, this is stored in an S3 bucket, and you can query and visualize the data in any way you choose. One common way is to utilize the Cloud Intelligence Dashboards – check them out! You will need to set those up yourself, but it’s a simple deployment.
ANOTHER BONUS ROUND: YOU GET A BONUS! AND YOU GET A BONUS! Don’t forget about Amazon CloudWatch! You can collect and track metrics, monitor log files, set alarms, and automatically react to changes in AWS resources. It’s in the name, you watch your cloud.
I’m glad you asked! There are quite a few case studies out there on optimization, but one of my favorites is Airbnb. You can check out the full case study, where Airbnb used some of the best practices and tooling listed above to save BIG. (How big? Read the case study and find out!) Spoiler alert – They reduced OpenSearch costs by 60%.
(Movie Narrator voice again) In a world where… ok forget the movie narrator thing. Engineers truly are the unsung heroes of cost optimization! Beyond just crafting lines of code, they are the champions of efficient spending, holding the keys to unlocking the full potential of AWS while staying cost conscious throughout the entire development workflow. Remember, optimization is a marathon, not a sprint, so stay vigilant along your Cloud Financial Management journey!
Ok, you can go back to coding now. So long, and thanks for all the fish.