How to reduce AWS costs in non-production environments?

How to reduce AWS costs in non-production environments?

Cloud waste is one of the biggest challenges when it comes to cloud-native infrastructure. Teams don’t see this at first glance and become aware of this problem after seeing enormous cloud bills without thinking they could go that high. A common situation for enterprise cloud deployment is that costs ramp up before a significant cost-related event or another tipping point happens when cloud costs become a serious worry. As a result, there is a pressing need for transparency and supervision, as well as frustration with the bill's complexities and a strong desire to slash expenses as soon as possible.

As a product fully-based on AWS at the moment, we tend to reduce cloud complexity for our users in every aspect. One of them is also AWS costs optimization

AWS offers tools that you can use to visualize your costs and usage like the Cost Explorer and Budgets. You can also follow the Cost Optimization advice and recommendations to modify your instances and save money. 

Here’s what you can do to minimize your costs on AWS:

  • Apply for AWS credits
  • Use Spot instances
  • Implement Auto-scaling for idle resources
  • Use the right AWS region
  • Rightsizing your needed compute resources

Check out our ultimate guide on creating an AWS cost optimization strategy.

These action points can help you reduce costs, but usually, the simple actions have the biggest impact. There’s one major thing about the non-production environments you can do to make sure you maximize your savings. Turning them off when your team is not using them. 

Companies that are responsible with their finances for a project usually make one big mistake. In order to save on cloud costs, they end up having only one cloud environment. In this case, the process of product development is greatly affected. You need your development, testing, and production environments to function properly. This is why we believe that saving on non-production environments when you’re not using them allows you to have two or three environments active during working hours.

Save up to 60% off Your AWS Costs

Since we are a startup, we need to keep our finances in order. That’s why we constantly work on reducing unnecessary costs. Microtica uses a great number of servers (EC2 instances) and RDS instances running to power our development, testing, and production environments. 

In order to optimize our resources, we decided to shut down non-production environments when they are not in use. As we are in love with automation, we started working on a solution to automatically turn off instances, with alarm-based jobs. After testing it out and receiving significant results for Microtica, we decided to offer this to our users too. 

By shutting down the non-production servers outside of work hours, Vertt managed to save 68% of their AWS monthly bill.  

So, how can you take advantage of this feature? 

Log in to the portal and in the sidebar, you will now notice the Cloud Waste Manager section. Here you can see 3 new pages: Cost Explorer, Saving Schedules and Waste Advisor.

Please note that to use this feature, you just need to have a Microtica account. You need to give the platform access to your AWS account on which you’d like to activate the savings. However, your projects don’t have to be based on Microtica and you don’t have to use our platform as your automation tool. 

Saving Schedules 

To create a saving schedule, you start with naming the schedule. Then, you select the days you want the schedule to be active. You also choose the timeframe in which the AWS resources should be active (start time and stop time). 

When you select the AWS account and region on the left side, on the right side you will see all EC2, RDS, and auto-scaling groups available. You can select them so that they are affected by the schedule you’re creating. In the status bar above you’ll notice the estimated saving amount change with each selection. This is an estimation of how much you’ll save in dollars if you apply the schedule on the selected resources. 

Another possibility is to select an environment and implement the schedule on all the resources in that environment listed on the right side.

When activating this schedule, it will mark all these resources to be shut-down at the defined Stop Time and to “wake-up” at the defined Start Time on the selected days. You will be able to follow the cost and status of the resources in the list on the right. 

start schedule for aws costsCreate schedule with tag filter

Another possible option to create a schedule, if you aren’t using Microtica environments, is to mark only the resources you want to affect with a tag. You can add tags to your resources in your AWS console

Then, in Microtica you enter your AWS account id. You also add tag name and value to automatically shut down all the resources marked with this AWS resource tag. After this, you will be able to see whether they are running or not in the list on the right. 

Adding a tag is optional. If you don’t filter by tag, all the resources found in the provided AWS account will be shut down. 

After activating the schedule, you will be able to see it in the list of schedules. Here you have some basic information around which AWS account this schedule affects and the estimated savings “numbers”. 

available schedules for AWS costsList of available schedules

Cost Explorer for AWS Costs

To stay on top of your cloud spendings and have full visibility of what is going on with the finances, we’ve created a Dashboard. Here, you will find some of the most important analytics connected with your AWS accounts:

  • estimated cost on AWS for the current month
  • how the month-to-date spend is behaving
  • a breakdown of your cloud spendings in the last year with a forecast for the upcoming year 
  • which AWS account costs you the most 
  • which services take the most spendings
  • costs by allocation tag 

Finally, you can see the accumulated estimated savings for the month. The data is based on the currently active saving schedules and daily utilization hours.

Cost explorer for AWS costsCost Explorer

Waste Advisor

The Waste Advisor provides recommendations to rightsize or remove resources based on analysis of your AWS account. You can get a detailed overview of all your resources, as well as actionable tips that can help you reduce cloud waste. 

These are the three crucial segments that the Waste Advisor checks: 

Low Utilization EC2 Instances

This segment checks the Amazon Elastic Compute Cloud (Amazon EC2) instances that were running at any time during the last 14 days. You’ll get an alert if the daily CPU utilization was 10% or less and network I/O was 5 MB or less on four or more days. While certain cases can result in low usage by design, monitoring the amount and scale of the instances will also help you save money.

Idle Load Balancers

Here, you’ll get an alert if your Elastic Load Balancers (ELB) don’t have active instances, don’t have at least one healthy instance, or the number of daily requests was below 100 requests during the last seven days.

Moreover, you’ll also get an alert if the state of your non-classic Elastic Load Balancers (ELB) is not active, if the new daily connections in Application Load Balancers are below 100 connections or if the new daily flows in Network Load Balancers and Gateway Load Balancers are below 100 flows (or connections) during the last seven days.

RDS Idle DB Instances

This segment checks the configuration  of your Amazon Relational Database Service (Amazon RDS) for any DB resources that do not have status 'available' or that have 0 Database Connections during the last seven days. If a DB resource has not had a connection for a prolonged period of time, you can delete the resource to reduce costs. If there’s a need for persistent storage for data on the resource, you can use lower-cost options such as taking and retaining a DB snapshot. The system retains manually created DB snapshots until you delete them.

Conclusion

Although initially invisible, cloud waste can cause a lot of unnecessary spendings you could use for more essential things. It's not unusual to see studies claiming that businesses are wasting money on the cloud. They're spending a lot of money on unnecessary assets and taking up more capacity than they need. AWS customers often use activities like rightsizing, scheduling, and acquiring Reserved Instances for predictable workloads to reduce their cloud costs.

However, using one tool to effectively manage your cloud savings you will experience long-term financial benefits. Moreover, it will save you a lot of time you’d normally spend on analyzing complex cloud bills, performing an automated analysis for you. Eventually, this will help your company accelerate growth, repurpose more resources for market research and development, and ultimately, for marketing activities for your products and services.