With AWS EC2 instances, you have access to scalable virtual machines so that you don't have to commit to purchasing extra hardware for computing processes.
Even though using on-demand AWS EC2 instances can be a fast way to get started, there are a few ways that you and your organization can start to lower your costs.
In this article, we’ll focus on long running EC2 instances. These are VMs that require a lot of time to run tasks. With AWS EC2's recurring charge, each second that your virtual machine is running makes a difference, and especially if it involves multiple instances.
By switching the operations of these EC2 instances to Reserved Instances (RIs), you could save up to 72% on your cloud costs compared to on-demand pricing.
This guide will show you ways to cut costs with AWS EC2 by finding long running virtual machines and applying Reserved Instances.
Defining Long Running EC2 Instances
Long running AWS EC2 Instances are active for long periods throughout the day and commonly perform tasks like background website scripts or complex computing calculations.
There is no absolute value for what qualifies an instance as “long running”, but your organization can set an arbitrary benchmark to start. You could just focus on instances that have been running for 90 days and use that parameter to guide your audit. These instances may be running consistent, predictable operations, and strong candidates for utilizing RIs.
How to Handle Long Running Instances
You can locate your long running instances with the AWS Management Console and the EC2 Dashboard. You can click "Instances" in the navigation and then select an EC2 instance to see its launch date and performance data under the "Monitoring" tab. You can also gather additional metrics on instance performance by utilizing a AWS CloudWatch monitoring script.
If an instance has slow performance and is taking up too much time, it may be related to an issue with the processing health of your VM. If your instance is long running due to failure, you can troubleshoot it to figure out what the root of its issues is.
If the long running jobs are not business-critical, then you might be able to reduce your costs just by canceling the jobs that the instance is tasked with running. With the AWS Management Console, you can directly stop, cancel, or terminate long running jobs.
Once you have identified your long running instances and determined if there are any health or job-related issues, you may find that you have healthy instances running naturally time-intensive tasks. If you expect these long running jobs will need to continue to be run as is, then you can consider changing to use Reserved Instances.
Reserved Instances for Cost Savings
AWS Reserved Instances can save you money by discounting your EC2 instances by at least 70%. This discount can be applied to your AWS EC2 instances without having to rebuild your VMs from scratch and is a discount for a one to three-year commitment. To purchase this discount:
- View the EC2 Dashboard.
- On the left, click on "Reserved Instances."
- Click on "Purchase Reserved Instance" to reveal multiple reserved instance options.
- Select the reserved instance that is appropriate for you.
- Add the appropriate RI to your cart and complete your check out.
AWS EC2 RIs apply automatically to new or existing instances that match the RI type. RI type is based on the kind of RI you choose to purchase. The selected RIs can only be applied to instances of the same type. Your VMs need to match the RIs requirements to qualify for the pricing discount. It is possible for you to scope your RIs based on region or area. If done this way, your RIs will automatically be applied to instances across instance sizes in the region or area. Standard and Convertible AWS EC2 RIs provide different discounts on your instances, so choose wisely to ensure you get the best deal for your case.
Automatically Finding Long Running Instances with Blink
You can make better decisions when you have more data readily accessible. Before you can make decisions about how to handle a long running instance, you need information about which instances qualify, what their usage data looks like, and the related business-impacts.
Instead of manually searching through your AWS console or scripting a query, there’s an easier way to aggregate reports on long running instances regularly.
With Blink, you can automate this check to run, produce reports on all the instances that fit the criteria, and leverage no-code/low-code steps to customize your process.
Get started and create your free Blink account today.