Reduce the cloud bill
Julien Coupez
Google Customer Engineer for Startups | x-AWS | Former founder/CTO | Mentor
Welcome back to our weekly series, "2 minutes for...". This week, we are answering the burning question of Costs in the cloud.
Let's face it: if you look at the purchase price of a machine and you look at what you're paying on the cloud to rent that machine time, it's easy to say that it's a rip-off and that you should host it at home. After all, you've got a good Internet connection...
"It's not about the money, money, money..." Jessis J.
But you do go out to eat sometimes, don't you? And you know that's really more expensive than cooking at home, don't you? Well, just like the restaurant, you can't compare the two, because the service is completely different. I could do a whole post on the advantages of the cloud, but I'll just simplify by pointing out that if you take all the factors into account (the TCO), it will be more profitable for your startup, trust me (well, some "startups" like 37Signals think otherwise though).
So the cloud is a must have, but that doesn't mean we can't reduce the bill all the same, does it? After this far too long intro, here are some techniques that you can apply to all clouds providers, and after more specifically applied to AWS.
Tag your ressources
The first obvious step is to find out what your costs are. There are fixed costs (your basic infrastructure) and variable costs linked to your traffic. It's important to understand how to measure your different costs. Most of the time, you can associate "tags" with your components (instance, database, storage, etc.) and environments (dev, staging, prod). If you haven't got a tagging strategy, here's one to apply to each component:
| NAME | VALUE | DESCRIPTION
-------------------------------------------------------
| env | dev/prod/staging | Track environment type
| app | my petstore 2.0 | Track each of your applications
| component | network/compute/BDD | Track the type of the ressource
By using this basic strategy you will be able to answer actionable question like
领英推荐
Look at the breakdown
Now look at your expenses. Chances are, one of your major items is compute (on AWS: EC2, Fargate, Lambda). Here are the 3 most importants things to do:
I need MOOOORE
You've done the 3 points above and want to spend even less? It's completely possible, so here are a few things to explore:
Conclusion
Remember, cost optimization is not a one-size-fits-all approach, take the time to look, chances are you'll be wasting your money. It can save you big bucks and I never met a startup that did all the cost optimization techniques, then you've got room to spare!
Feel free to comment or contact me if you need help managing your costs :)