15 Simple Tips to Reduce Your AWS Cloud Cost

If you have taken up the challenge to cut down your organization’s AWS cloud spending, this is for you. Looking at hefty AWS monthly bill, typically most of the people will start looking for HELP outside, they will evaluate some tools, seek expert advice, do readings, and more reading. There is nothing wrong here, but in this whole process, you lose one crucial element ‘time’ which costs you money with cloud’s ‘Pay as you Go’ model. Here I will share few simple tips which you can start following right away and see the immediate benefits.

Most of these recommendations apply to POC/Dev/QA/Staging workloads. Also, as EC2 contributes to most of the monthly bill, most of the recommendations are for EC2 and related services.

Here it goes –

  1. AWS Region – For development/test workload where latency is not a concern, choose less expensive AWS areas. US geographies are a lot less expensive than Asian geography.
  2. EC2 instance families have different costs, if performance is not a concern, choose cheaper family instances like t2 or m4. I find this website very useful to quickly check EC2 pricing: https://www.ec2instances.info/
  3. Always start with smaller size instances. If required you can anytime scale your instance vertically. Same applies to EBS disks.
  4. If you require persistent usage of the EC2, go for reserved pricing model as you can save up to 40% there. However, RIs should be bought after careful analysis of your requirements. Unless sure of consistent usage of right capacity and instance types, don’t buy RIs. I have seen people wasting a lot of their RIs due to unforeseen requirements.
  5. Use EC2 Spot instances for CI type workloads where you bring-up your deployment environments, test and destroy it in an automated manner.
  6. Do not use Elastic IP unless required. Go with Public IPs. Keep track of un-attached EIPs and release those as you find. You can develop a small Lambda-based script for this and schedule to run it every day in the evening just before everyone leaves office.
  7. If your instances in the private subnet (using NAT) needs to upload/download data from S3 (same region), consider using VPC Endpoint instead of NAT. This method would help you save significant data processing cost of NAT.
  8. If your EC2 instances access the internet via NAT, launch NAT instance/Gateway in the same AZ as EC2 instance, and it saves on inter AZ data transfer charges.
  9. Use instance-store volumes for EC2 wherever applicable. They come for free. Typically you can use it for /tmp fs or any non-persistent data storage.
  10.   Keep a close watch on unused EBS volumes. Even if you stop the EC2 instance, you keep paying for EBS storage. Again, develop a small Lambda function which reports back all unused EBS volumes and optionally delete those.
  11.   Terminate instances when you are not going to use it for long. Prefer to recreate EC2 than stopping it for a long time. Also, when you terminate EC2, make sure all EBS volumes are also deleted.
  12.   If you are not going to use stopped instance for a while, but you have important data on EBS volume, take a snapshot and delete the volume. Snapshots are much cheaper than EBS.
  13.   Keep track of AMI’s. Delete older AMI’s. Typically this should be done in an automated manner. You can tag your AMIs with    expiry date and have automation script which removes AMI’s which passes their expiry date. The same mechanism can be applied to other AWS resources like EBS Volumes, Snapshots.
  14.   Don’t keep your instance running when not required. This is a major contributor to your wasted money. People will just start the VM and forget to shut it off. Someone has to monitor that and bring it to notice. For this, you can create a simple Lambda function which lists the running instances in all AWS regions and sends out an email to all AWS users.
  15.   Always Tag your AWS resources. They come to rescue when it comes to tracking your cost say based on Project, or customer, or the environment, etc. Also, it enables your automation scripts to decide whether to deprovision given resource or not.

Hope above- mentioned tips would be helpful in optimizing your AWS cloud cost.

However if you are looking for a solution which tracks your cost, provide recommendations, shows up unused or underutilized resources, sends you alert, etc. write to us at marketing@gslab.com to know about GS Lab’s Cloud Cost Optimizer.