<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tristan Woerth on Medium]]></title>
        <description><![CDATA[Stories by Tristan Woerth on Medium]]></description>
        <link>https://medium.com/@twoerth?source=rss-8f8395835263------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*nWgXhUt5RZKXHjnf.</url>
            <title>Stories by Tristan Woerth on Medium</title>
            <link>https://medium.com/@twoerth?source=rss-8f8395835263------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:49:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@twoerth/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cost Optimisation on AWS]]></title>
            <link>https://medium.com/@twoerth/cost-optimisation-on-aws-f095aa5b813e?source=rss-8f8395835263------2</link>
            <guid isPermaLink="false">https://medium.com/p/f095aa5b813e</guid>
            <dc:creator><![CDATA[Tristan Woerth]]></dc:creator>
            <pubDate>Mon, 29 Nov 2021 09:06:06 GMT</pubDate>
            <atom:updated>2022-01-31T11:45:01.125Z</atom:updated>
            <content:encoded><![CDATA[<p>If you were to do a cost optimisation survey on ten AWS users at different stages of their journey, you’d be likely to receive ten different answers. Some elements of the answers will be common, for example Reserved Instance. If you ask those users whether they make use of the possibilities, you’re likely to face answers ranging from “We looked into it for next year”, “It’s complicated”, “I got burnt and will not do it again”. On top of that, you’re likely to collect a few juicy anecdotes of a cost saving opportunity which was raised only after they realised they were using a service in a suboptimal way.</p><p>We propose to look into the topic of cost optimisation as a bigger picture and try to devise a strategy which will help you keep those costs under control for the long term.</p><h3>Planning for the cloud</h3><h4>Assess what needs to be on AWS</h4><p>One radical way of avoiding costs on AWS is simply to not migrate what doesn’t need to be migrated. This doesn’t necessarily mean keeping things on-prem. We recommend spending time doing a proper inventory of the applications in use and evaluating those applications through the lens of the 6R analysis. “Retain” will stay on-prem, “Retire” doesn’t need to be migrated at all.</p><h4>Right sizing</h4><p>Application falling into the “Rehost” and “Replatform” categories should be put under analysis using automated tools such as the Migration Evaluator. Simply mapping existing hardware to equivalent instance types is not enough. There is much to gain in actually evaluating the usage patterns of those applications to find the most suitable instance type. Unlike on-prem where the sizing decisions have long term consequences, once those applications are in the cloud, they can be resized in a much more flexible way. It pays to be relatively conservative with RAM and CPU, aim for a higher average usage and plan to handle usage spikes with techniques not available on-prem. Some applications can be scaled dynamically depending on load, some application can be resized to larger instances at specific times in the year.</p><h4>Turn off instances when they’re not used</h4><p>One pattern which usually comes as a surprise to administrators used to operating their own hardware is the idea of turning off instances according to a schedule. We’ve seen very good results with dev / test environments as well as build servers. It usually makes no sense to keep those instances running during nights and weekends. It’s not unusual to realise a 70% saving on suitable workloads.</p><h4>Some workloads can be off by default</h4><p>Some workloads can actually default to being off. They are ready to go, but brought up only as they are needed. One example which comes to mind is the clusters used by Data Scientists and Data Analysts. Modern tooling accommodates itself very well with ephemeral clusters which are only brought up as they are needed. Workloads which need to operate only for a few hours at specific times in the months are also perfect candidates.</p><h4>Plan for AWS Silicon</h4><p>Once you’ve gone over all of the above, you should have identified a few workloads which have a higher than average need for compute. Those should be considered as candidates for AWS processors (Graviton, Trainium, Inferentia, possibly more to come). There will be slightly more testing involved than with a more classical Lift &amp; Shift to more classical CPUs, but it will be much more cost effective to change your build pipeline once to deploy directly onto new silicon rather than move as is and have a story to “consider graviton” rotting away on a backlog.</p><h4>Budgets and Alerts</h4><p>Get into the habit of setting up a budget as you’re building up a workload. The key idea is to avoid noticing your workload is consuming more than you expected so you still have a chance to do some course correction while there’s still some time left in the month. However getting into the habit of budgeting as you are in the early phases building causes good discussions to happen early in the project.</p><h3>Financial models</h3><h4>Reserved instances</h4><p>It’s possible to commit to keeping instances up for long periods (one or three years) and realise sizeable savings. Reserved instances require careful planning as reserving the wrong type of instance can end up costly. We typically recommend them only for very specific workloads where the long term usage is unlikely to change.</p><h4>Saving plans</h4><p>Saving plans allow customers to commit as well. However instead of committing to instance types, you commit to spending a certain amount per hour through different families of services. Careful planning is also a key, but it’s possible to layer Saving Plans over time and realise saving in a much more flexible manner than with Reserved Instances. Saving Plans are typically what we tend to recommend for the majority of customers. It’s worth noting that some types of workloads are not eligible for saving plans (at the moment), so it’s not uncommon to see savings plans completed by reserved instances. One typical case being Relational Database Service (RDS) instances.</p><h4>Up-front payments</h4><p>Both Reserved instances and Saving Plans offer deeper discounts with an up-front payment. Partial up-front unlocks the bulk of the discount, but means that there will still be a monthly charge. Full up-front doesn’t offer a big discount over partial up-front, but the lack of recurring charge makes it an interesting instrument to turn today’s unspent budget into capacity which will be unaffected by cost cutting exercises for the years to come.</p><h4>Recommendation</h4><p>The financial planning requires an unusual level of collaboration between technical and financial people. The collaboration is intense during the planning phases and it pays to even increase that collaboration over time. From experience, turning to a partner with experience and the right tools can make a huge difference for most companies.</p><h3>Regular Clean Ups</h3><p>When we review AWS accounts which have been in use for a while, it’s very common to come across services where the costs have been creeping up month after month. Very often those costs are very difficult to track back to the responsible people so they end up being treated as a fact of life until they grow out of control.</p><h4>Accountability</h4><p>Establishing the habit of tagging resources goes a long way into ensuring that the situation is less likely to get out of control. This typically requires to get started with a minimum set of rules and putting in place the minimum processes to enforce those rules. Some companies go into re-attributing costs to cost-center, some only want to inform the responsible people of how much they are spending. The recommendation here is to start the minimum viable scheme and iterate over a few billing cycles.</p><h4>Unused resources and general waste</h4><p>If the company has established healthy practices around accountability through tagging and regular reviews, the following points will be easier to spot and resolve.</p><h4>Storage</h4><p>Unused storage can take several forms. Some of it is relatively easy to spot, like left over EBS volumes corresponding to long gone EC2 instances. Similarly you may have been accumulating snapshots of EBS volumes, or multiple backups of different services.</p><p>Some forms of waste are much more difficult to deal with, like for example files in an S3 bucket which may now rest in there with no hope of ever figuring out whether they still have a chance of being used ever again. S3 has features which allow you to reduce the financial impact of that waste, for example by moving dormant files to other classes of service.</p><p>A third form of waste comes from misusing services, sometimes because of policies set by a different department. Over the years, we have collected quite a collection of anecdotes going in that direction… We’ll touch only on one where S3 versioning was mandated by policy and ended up unexpectedly ramping up the bill when a team started automating rewriting a small configuration file every minute.</p><h4>Logs</h4><p>Logs require a special mention. They end up on storage where they can lead to waste, but many services charge on ingestion as well.</p><p>When a service ends up generating a lot of ingestion charges, it’s important to have established a culture where people are willing to work on solutions regardless of company boundaries. Silo thinking can really hinder any attempt to keep those costs under control. Imagine a development team needing to log debug level information, security and compliance mandating an ingestion mechanism with automated insights generations and 6 months of retention and finances struggling with non budgeted costs.</p><h4>Left-overs of experiments</h4><p>Those should be obvious to most people who ever experimented with a new service. It’s easy to set things up, get a better understanding of the problem and then move on to a different solution. There are ofter left-overs on those experiments.</p><p>There are quite a few services which will generate a relatively small charge just for being enabled. Examples include Elastic IPs, CodeCommit users, some billing models of Quicksight, etc. Those show up in bills and will be questioned at some point. However chances are those experiments generated CloudWatch logs, with a “never expire” retention, which are very unlikely to ever be needed and as unlikely to ever get cleaned up.</p><p>Some of those costs are so tiny that any effort to identify and remove them outweighs the saving potential. Those need to be addressed at the organisation level to come up with a strategy which stop them from growing in a systemic manner.</p><p>The rather radical recommendation here is to only experiment in disposable accounts.</p><h4>Company defaults</h4><p>One particular form of waste comes from company defaults. They may make perfect sense for over 90% of the cases, but they are generating unnecessary costs for the rest. One case which comes to mind is a large customer who are able to provision sandbox account on demand. Those accounts come pre-set with defaults which make perfect sense if the requester intends to use EC2 instances. The networking will already be set up according to the company wide standards. Those defaults have a cost, regardless of EC2 not being used. As the company becomes more agile and more people start experimenting, in particular with serverless solutions, a growing fractions of those costs will be wasted.</p><h3>Conclusion</h3><h4>Culture eats strategy for breakfast</h4><p>The most important key to cost optimisation on AWS is probably culture.</p><p>Without the right culture you’re likely to fall into unhealthy extremes.</p><p>One of those extremes is an environment where committees are formed with the hope of reaching a perfect solution through consensus. Beyond the obvious risk of Analysis Paralysis, one of the issues with the idea of trying to plan everything and only making a move once everything is covered is that there are things which you will only really understand based on practice. This is not something you can fully cover by hiring people with previous experience. They gained that experience in environments which are not exactly your environment. Also, that experience can not integrate the new services which have become available since they built that experience.</p><p>A different, relatively common, extreme occurs when some lines of business are already at varying levels of cloud adoption while the rest of the company is blind to the situation. This can be collective blindness, where the line of business is not aware of the implications. However, it can also be the result of the line of business being discreet about their activities to avoid interference from other departments. This can lead to a lot of friction when an objectively less experienced team starts telling the line of business how things are supposed to be done “in the cloud”.</p><p>A healthier culture will have people working across internal company boundaries towards solutions which will satisfy as many people as possible. It should favour long term benefits over short term goals and encourage learning through experimentation. In fact one of the key markers might be that failed experiments become valued for the knowledge that was gained from them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f095aa5b813e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>