Cloud cost optimization in AWS

Cloud cost optimization in AWS

Everyone who is in working in cloud, whether you are a cloud engineer or solution architect or just a developer who is into cloud, it is very important for you to understand how you can optimize the cloud cost which can directly impact margins of the company. The more efficient & cost friendly your process becomes, more & more stakeholders will come forward to taste the products & services of your company.

Today, let’s deep dive & understand what are some of the cloud cost optimization techniques in AWS. Please take a deep breath & start reading the article because it’s gonna be bit lengthy 😉

1. Discount models

Before starting something, don’t feel shy of negotiating with cloud provider, Jeff will welcome you by offering good amount of discounts. Many people will assume that we are anyway into the cloud & taking the advantage of pay as you go services, you are right !! But there are many workloads that don’t fit into that umbrella.

Imagine you launched a web server on an EC2 instance, even though you will not get requests for your server, you will be paying cost for the underlying infrastructure i.e. EC2 instance since it is running continuously. There will be many such examples.

According to your requirements in your project & overall at a company level, you can have enterprise level agreements with your cloud provider for your workloads or usage.

2. Right sizing your infrastructure continuously

If we take an example of EC2 instances, you can enable auto scaling for increasing or decreasing the number of instances based on the incoming traffic. Keeping some threshold level alerts on CPU, Memory & use those statistics to change the type of EC2 instance if you wanna do vertical scaling. It is rarely used until & unless you have some special use-case.

3. Tagging

Tagging is must. It will help you in multiple ways. If you want to see the bill for a particular business unit, these tags will save you ton of time. If you don’t mention tags & it’s difficult to track those orphan resources which are running somewhere in your account.

Many people will forget adding tags, some will not follow proper naming convention while giving tags. Best way to solve this issue is to use cloud formation templates or terraform by enforcing the tags from there. Don’t create resources manually even in your play environment dev !!

4. Take care of your storage

Many people will dump the files in S3 & never bother to delete them again. If you are not using your files, move to different storage class in S3, by default S3 creates standard storage class which is quite costly. You cannot afford to pay the bills if you keep storing all your files in Standard buckets years together.

Set some rules & follow the best practices of storage lifecycle management. Move files to glacier if you aren’t using. At least, enable intelligent tiering in S3, AWS will do all the hard work for you & in turn saves you ton of money at end of the day.

5. Reward the teams

Incentives always acts as best motivation triggers in any organizations. Then, why not reward them if they are following all the best practices by reducing the cost of company. Pat their back, clap for them, feature their names or publish their best practices. Whatever suits you best, ask your organization to do such things, if you are a leader in tech, implement it.

6. Using EC2 savings plan or look for spot or reserved instances

Savings plan is nothing but a customized offering which AWS is giving to you to reduce your bills. Reserved instances is just like doing advance booking of your tickets which can save you cost, in the same way if you give 1 or 3 year commitments to AWS by choosing a particular instance type , AWS offers discount on the price.

AWS offers spot instances which have highest discount among others. Spot instances are created on unutilized infrastructure of the AWS, if the AWS wants it back, your instance will be terminated on spot. So, we should make sure we do not run any critical applications here.

7. Design with cost in mind

If you are an architect designing the applications or cloud engineer who involved in design part, make sure you give priority to the cost from day-0. It’s not like you designed the whole thing & at the end of the day, you are worrying about cost while implementing. Shift left, start taking cost into consideration while choosing any service in your architecture.

8. Chargeback

Some organizations wanna charge their customers back on the bill they got. So, make sure you enforce tagging & use services like AWS Trusted Advisor or any other 3rd party tools for tracking each & every penny spent.

9. Data transfer

AWS will charge you left, right & center when it comes to data transfer. Make sure you understand & implement things carefully. Even if you are moving your data across regions or across availability zones, data transfer charges are applicable guys.

When data is coming from internet to AWS, it won’t bother AWS, they don’t charge you. But when data is moving from AWS to internet, they will charge you. Cost is different for different services. Make sure you implement private links to save the costs.

10. Downtime costs

Do you know what’s one of the biggest cost for any organization?? If it could not able to make their customer application up before the time mentioned in their SLA. Your companies will pay hefty amount. So, to avoid downtime, implement disaster recovery mechanisms. Test them correctly.

Predict the spike in your resource usage & start tightening your seat belts, preparing for increased demand.

11. Monitoring

Without knowing for what reason, your cloud spend is increasing, how you can optimize the cost ??

Monitoring will give you overall picture or visibility of what is happening, then you can take a call on what to do. Avoid any budget overruns & optimize resource allocation strategies. Better be safe than sorry.

There are number of cloud optimization strategies, this list is not exhaustive. Let me know what are the optimization strategies you are following in your organizations !!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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