Skip to content

Instantly share code, notes, and snippets.

@0xMH
Last active August 9, 2018 14:51
Show Gist options
  • Save 0xMH/37daf0d2c6a4e67b167542f736b678b8 to your computer and use it in GitHub Desktop.
Save 0xMH/37daf0d2c6a4e67b167542f736b678b8 to your computer and use it in GitHub Desktop.
AWS CUT Costs
Dears,
I went through our AWS account specially the 2-instances xxx.xxx.com and ooo.ooo.com,
Here’s what I noticed and what can be done to reduce the cost.
First:
For the “xxx.xxx.com”
Instance type: On-Demand c4.large
We pay approximately $75/month for it.
I used the EBS volume Creation date to determine the Creation date of the instance which is May 31, 2016.
So 7 months on 2016
12 months on 2017
5 months on 2018
So ( 7 months + 12 months +. 5 months ) * 75$ = 1800 $
After doing the Approximately math. It costed us approximately 1800$ for 2 years
And That’s A LOT!
What’s My suggestion:
First of all I suggest we upgrade the instance from c4.large to c5.large as It’s cheaper a little bit.
(c5.large On-Demand instance costs 62.22$, That’s 12.18$ less than c4.large with a better Specs!!)
To get the most benefits out from AWS we gotta use the Reserved Instance type.
So I suggest we buy c5.large reserved instance,
Hence we could reduce what we pay from $74.40/month to 39.42$/month and lower!
If we bought 1 Yr (No Upfront c5.large Reserved) It’ll cost 39.42$/monthly 473.04$/for 1 year, that’s 946.08 for 2 years In contrast of 1800$ we paid.
If we bought 1 Yr (Partial Upfront c5.large Reserved) 37.57$/monthly 450.76$/for 1 year, that’s 901.52 for 2 years In contrast of 1800$ we paid.
It could get lower if we decided to pay all upfront but I guess that’s enough saving for the day.
Also we could consider buying a reserved from the marketplace if we need something for the short term.
Second:
For the “ooo.ooo.com”
Instance type: On-Demand t2.large
We pay approximately $66/month for it.
T2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline.
As we can see from the diagram bellow that we already have the Maximum earned CPU credits most of the time which is 864.
https://www.dropbox.com/s/qndhl4pax07p5ue/aws.png?dl=0
So yes T2 is the most suitable type for smaster as it’s not in a constant use.
I guess we may shrink it to t2.medium but with just 4GB of Memory I’ve some Fears of it not sufficient.
I suggest buying a reserved instance for this instance too which will cut our cost to nearly 42$ or less depends on the Upfront payment.
What is the result?
AWS costs was lowered by about 40%
Diagram:
https://www.dropbox.com/s/31gge22efbvw7sp/awsCosts.png?dl=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment