Five Ways to Reduce Your AWS Bill
Hosting your infrastructure in the cloud has its benefits in terms of auto-scaling, HA, pay-as-you-go billing etc. but if we're not careful with the monitoring of the usage, we can end up over-allocating and under-utilizing resources which can take a bite out of our budget.
The above graph is from our actual AWS cost explorer. We at Loop were able to reduce our cloud expenses by 1/3rd. Here's what we did.
1. Removed un-needed Synthetic Canaries
We have a few public facing URLs that were being monitored by Synthetic Canaries in Cloudwatch. Canaries are fancy name for pings to a URL that collect http responses and feeds to Cloudwatch. There is a charge per run. Since our QA environment is a (scaled down) replica of our prod, we setup the same canaries for QA URLs. Turns out these were adding considerably to our cost without adding much value to us (if our QA env was down, it wasn't a customer outage, and we could live with that).
We did the following to optimize this cost:
2. EC2 optimization
The second contributor to our cost was EC2. On monitoring the usage, we found that we had over-allocated these boxes and the burst usage hardly came to 40% of CPU/memory.
We did the following to optimize this cost:
3. EBS Volume shrinking
The third contributor to our cost was over allocating volumes in EC2s. On monitoring the disk space on all EC2s, we found our space to be in the range of 30-50% filled. Needless to say this had to be optimized.
We did the following to optimize this cost:
领英推荐
4. S3 compression
The fourth contributor to our cost was the data in our S3 buckets. We used the Storage Lens dashboard to isolate the buckets that had the highest volume of data. We had the choice of setting up lifecycle policies so that data older than 2 months old would be auto archived to glacier however this would have a cost per object and since we had a lot of objects, this would not be feasible for us.
We did the following to optimize this cost:
5. RDS optimization
The 5th contributor to our cost was the beefy RDS instance that we had provisioned that was also under-utilized. On monitoring the usage, we found that we had over-allocated this instance and the burst usage hardly came to 30-35% of CPU.
We did the following to optimize this cost:
Conclusion
I hope you found these tips helpful. What are some of the ways you have optimized your cloud costs?
???? Data Scientist | ?? AI Expert | @Perlatours -> CIO -- @Godi.AI -> Founder
6 个月Mohsin Kalam Tracking and optimizing cloud costs is crucial. Right-sizing instances and leveraging reserved instances are key strategies to consider for immediate savings!
SEM / Chief Architect / DevOps Engineer / Senior Infrastructure Engineer
2 年Check RDS Aurora Serverless, if it fits your use case. Can drastically impact the cost and performance