Manage your AWS Bills & Cost

hemalbuha
4 min readOct 7, 2021

The good thing about AWS: you usually pay for each use. The bad thing about AWS: understanding price models for all AWS services is difficult.

Let me start with the process of analyzing your AWS credit(bills).

Use Cost Explorer to cover the cost of the service.
1. Which services create the most expensive?
2. Does the cost of each service match your expectations? For example, it’s almost impossible to want to spend 2x more on CloudWatch than EC2.

Visualize your spending over the past 12 months.
1. Does the cost increase by the same amount each month for a particular service? If so, you may be able to collect unused resources (e.g., EBS abbreviations).
2. Any higher cost increases that could be caused by changes in your cloud infrastructure?
3. Is the increase in monthly expenses the same as your income numbers?

See AWS bill for the details.
1. Which service resources incur higher costs? Forgive the cost.
2. Does the cost of each service match your limitations?
3. Are there any cost indicators for unused resources?

In particular, you should pay attention to the following factors.

EC2

Basic Power Purchase Plans. The agreement is simple: committed to the use of computer monthly power, AWS offers a discount on the required amount.

Identify and disconnect unused instances. It’s boring but it works very well.

Make sure the model type still reflects the current workload. Check out CloudWatch CPU metrics, Storage I / O, and sites for first guesses. After that, try to test your thinking.

Make sure the high I / O performance of the model matches the performance of your EBS volumes. Remember that there is a network between your EC2 model and your EBS volume. The model type limits the maximum throughput of all EBS volumes. Make sure it matches the configuration of your EBS volumes, where the volume type and IOPS provided define the maximum output.

Use Spot Instances for loads of countless and productive tasks. Keep in mind that AWS may terminate your site at any time before using it in production. Learn 3 easy ways to save up to 90% of EC2 costs to learn more.

Switching to the latest model models often reduces costs. For example, migration from m4.large to m5. reduces costs by 4%. In addition, you also get a little performance improvement.

Using AMD- or ARM models based on Intel model models is also worth a look.

The ability to save types of AMD-based models (e.g., T3a, m5a, and r5a): 10%

Power saving types of ARM-based models: 40%

On the other hand, it is a small task to move to the Open Source operating system. Our preferred app for AWS is Amazon Linux, a free Linux image stored by Amazon.

EBS

Usually, EBS summaries are included. Therefore, delete summaries created for unnecessary backup data. Also, check to see if your backup solution removes old summaries. Have you written a backup solution for Lambda? Replace AWS Backup.

Remove abbreviations of unused AMI. A common waste management problem is when your pipeline builds AMI into every commitment.

Search for unused volumes and delete them. See if someone (script, Kubernetes, …) creates volumes automatically and does not clean them.

S3

Clear but still effective: remove unnecessary items and buckets.

Consider using S3 Intelligent Tiering. Or, if you need to archive data, check out the Glacier Deep Archive.

Prepare life cycle policies that define the storage period. Read Object Lifecycle Management to learn more.

VPC

Check the cost of NAT gates. I have seen situations where placing EC2 conditions on a public subnet was the only way to avoid terrible road costs.

Also, create VPC terminals for S3 and DynamoDB. Doing so reduces the traffic generated by your NAT gates.

Getting inside the VPC is free? No, it is not. Traffic between access points is priced at $ 0.02 / GB. Check the cost of traffic and consider making changes to the construction of your buildings where necessary.

VPC storage area costs $ 7.20 per AZ and month in US East (N. Virginia). Adding VPC terminals for ten services to 3 AZ costs $ 216 per month. And the data used is not even included. Generally, avoid VPC terminals where possible. Learn 6 new ways to reduce your AWS debt with a little effort to learn more.

CloudWatch

Configure the retention time for all log groups. For example, delete incoming messages after 30 days.

Check the cost of API metric calls created by third-party tools (e.g., Prometheus, DatadCloudWatchog, …). Make sure you only need the voting metric you need and set the voting time to 5 minutes.

Each CloudWatch alarm costs $ 0.10 per month; the CloudWatch dashboard costs $ 3.00 per month. Therefore, remove alarms and dashboards.

Identify unnecessary custom metrics. For example, configure CloudWatch Agent only to post the metrics you need for monitoring.

See log import costs. You may need to minimize or filter the log events you post to CloudWatch.

--

--

hemalbuha

Aim for the moon . If you miss, you may hit a star 🌟.