How Amazon is Billing the EC2 Service and Key Tips to Reduce Cost

Serkan SAKINMAZ
3 min readJan 19, 2019

--

AWS EC2 is a web service that provides secure and scalable server machine in the cloud. The main advantage of the EC2 is that server management is very easy from from console. When you provision an on-premise server, it is not easy to configure security policies, disk management, back-up management etc. AWS accelerates all this kind of stuff.

Before using EC2 in your project, it would be better to understand how to use EC2 effectively and how AWS is billing the service

EC2 Contract Types

AWS offers different type of contract to start using EC2 service. Let’s investigate the contract types

On-demand

You don’t need to contract for specific time period. AWS charges by the hour

Reserved

You need to contract with AWS for 1–3 year. The key thing to note is that AWS offers a discount for reserved commitment.

Spot

Let’s imagine you have an application which has flexible start and end time. You define a bid price whatever your are willing to pay server

Dedicated

It is useful when your organisation has a software licence and moving to AWS. This servers are going to be used only for your organisation.

EC2 Server Types

AWS offers different type of servers depends on your technical requirement. Server type selection is one of most important thing to manage your budget and use EC2 server efficiently

In case if you need to use memory processing application like Spark, it would be better to provision Memory Optimised server. On the other hand, if you use Memory Optimised server for Hadoop, you pay much more without using the server resources.

EBS Types

Basically, Ebs is a disk based storage service that can be attached to EC2 machines. According to technical use-case, you can use different type of storage service .

Auto Scaling

In case you need a clustered environment, it would be better to define auto scaling policy in order to manage resources efficiently.

Let’s think about that you have a batch processing job which runs one a day in order to process massive amount of data. So, you provisioned more than one machines. But, when the system is idle, you are going to be charged unnecessarily. But, if you define auto scaling policy, the system is going to be closed when the system is idle.This configuration is going to be reduce your cost

EFS (Elastic File Storage)

EFS is a file storage service that can be attached to EC2 machine. The important thing to note is that EFS can be mounted more than one Ec2. So, in case you need a file storage, it really make sense to use EFS rather than EBS

Final Words

In order to select right service, you need to make sure to understand what services you are going to use, how many resources you need and what type of storage you really need. These things is going to help you to reduce the cost and use EC2 efficiently.

--

--

Serkan SAKINMAZ
Serkan SAKINMAZ

No responses yet