Showing posts with label reduced aws bill. Show all posts
Showing posts with label reduced aws bill. Show all posts

How can we reduce the running costs on AWS Server?

Amazon Web Services

Cost Reduction or Saving money on AWS EC2 Instance


In AWS EC2 pricing, there are three main elements such as an Instance, a Snapshot and a Volume.

So, ec2 instance pricing includes the cost of each of these resources consumed, such as hard disk space, bandwidth and is costing us money on a daily basis.

The idea is to take a backup of our unused data and source and move them into cloud storage and then delete the dormant instances, snapshots and volumes.

This will result in an immediate reduction in our running costs of AWS EC2 instances. I will briefly explain how we do it, here.

Logon to our Amazon Web Services console and choose EC2.


What are the EC2 elements that cost money?



Amazon Web Services EC2 Saving Money Dollars
In the EC2 dashboard main screen, among other things, we will see Running Instances, Snapshots and Volumes. As indicated, these things cost us money, by the hour. Of course, Elastic IPs also cost, but only if we aren't using them.

Of these, the instances will cost us according to the server we have chosen, micro, small, medium, etc. The storage that we use for the server (OS and data) is also on cost. Further, the bandwidth used, for uploading and downloading source and data is also at a cost.

Technically speaking, these servers we hire, cost us only if we use them. But, there is a catch. Since, we are using storage, these storage spaces are payable, whether we use them or not. Even though the costs are not too high for storage, if we are not careful, we may end up paying dollars unnecessarily.


Removing dormant instances and volumes


As a first step, we will have to identify the volumes that are used by our running instances.














In the above, you may see that there are 2 instances, but three snapshots and 5 volumes. This may indicate an excess of 1 snapshot and 2 volumes. These may be noted, evaluated and if found not required, deleted.

Once identified, we will carefully note them down. We do not want to delete any running instances or storage spaces, unintentionally.

For this purpose, we will make a note of the instances and link them to the volumes connected, using the instance id.

Once they are identified, the next step is to make a note of our stopped instances. Every instance may be linked to a volume or storage area in the network.










If we find that the above 3 stopped instances are no longer required, we may terminate them, along with the volumes that  they are linked to, to reduce our aws bill.

Once we have identified the instances and volumes that we do not require, we can delete our instances, along with the volumes with data and sources.

If, during the creation of the instances, we had chosen the volumes to be not deleted automatically upon termination of the instance, the volumes will not be deleted on deletion (termination) of the instance.

Under such circumstances, the orphan volumes may need to be removed independently, later.

Alternately, we may detach (right click on the volume to be detached and you will see a context sensitive menu) the volumes individually and then delete them.


AWS EC2 instance review


We will have to do this preventive maintenance, every time a new instance and/or volume is created and the old instances and volume are stopped and lying unused.


These cost us money and thus the savings on AWS EC2 instances through maintenance, may be substantial over a period of time.

Unravelling the mystery of AWS Cost reduction

What is AWS?


AWS, as most of us know, is a way of running a server without the hassle of maintenance costs, better up time and having the flexibility of owning the latest infrastructure, not to mention the possibility of ramping up or down on our resources flexibly.

Most of us have been using AWS as a matter of fact, without knowing much about the details.

If you have been using AWS for a long time, you would have noticed that the cost of running the server has been increasing over a period of time.

This is especially true, if you have been making changes to your server, creating new snapshots, stopping old instances, creating new instances and so on, on a regular basis.


Did you wonder why AWS costs are increasing gradually?

Are you wondering why you are running up an inflated AWS bill, even though you are running only fewer instances. Well, you should know that even though instances that are not running are not charged for, the resources that they run on, they add up to your bill.

The reason is that resources, once created/initiated, will cost us by the hour, however minuscule it may be.

The resources would be the volumes that you created that are lying idle, mainly the hard disks that contain your operating system, the software or web application etc., You may also want to delete your snapshots and AMIs, even though they may cost only a fraction of what the volumes do.
So, the stopped instance, though it may not incur charges, as Amazon claims, the related resources, such as the volumes attached, the snapshots, the AMIs that you use, all add up to the cost that we would be paying for using the Amazon server at the end of the month.

Now, let us see what we can do to reduce our monthly AWS bill.


How do we Reduce AWS Billing costs?

In the first place, we need to identify the resources that are costing us, what are the resources that are costing us, how much each of these resources are costing us, we need to find the split up of the costs.

So, how do we do it? Once you login, go to the "Billing" page when you click under your name (top right)

This AWS Billing dashboard gives you details about services/resources used and the cost till date.



Click on "Bills". Then, you can select the month for which you want the bill to be shown.


For the present month, we can take a screenshot of the page today. Then come back tomorrow and take another screen shot. A three day screenshot would give us an idea about the cost incurred on every resource type per day; by calculating the difference from the first day to the second day to the third day.

If you notice, there is a category called "EC2-Other" . This is the area we need to focus on. This denotes the Volumes or disk usage for the running and the stopped instances. If we have many stopped instances, it also means that there are many volumes attached to them.

Essentially, these unused volumes or AWS resources are costing you by the hour.

Find out if these volumes are required now. If not, detach them; then delete them. It could cost you around $0.10 per GB per month. So, if you have unused volumes to the tune of 600GB, you could be paying an extra $60 per month on a regular basis, which adds up to quite a sum.

Take snapshots of instances that you do not need now and then terminate them. Detach and delete the volumes that they are attached to. If required, you can revive them from the snapshot information. Snapshots generally do not save the unused space. So, if you have a snapshot of a 50GB instance, it will save only the data that is contained in the 50GB instance. If your 50GB instance has 45GB of free space, you will be paying for only 5GB of snapshot storage.

Since, snapshots are stored in S3 by default, though you may not be able to see them in your S3 page, they cost much less than retaining them in the EBS.


Migrate your AWS server from old to new (m1 to t2)

Apart from saving on your costs by eliminating unnecessary AWS Volumes, another option you should consider is to move your server to the latest on offer from AWS, like from m1 to t2.

The general idea is that these new servers provide better performance while costing up to 50% lesser.

The steps to follow would be to create launch a t2 server. Setup all the software necessary to create a copy of the existing m1 or m3 server.

Take a backup of all the source code, database, configuration files and scheduled job scripts/application.

Set up the new t2 server, with your paraphernalia.

Test the application in the t2 server. Time the migration wisely, in order to minimize or avoid downtime in the old server. Ideally, it should be at a time when traffic on the server is lean.

One thing to consider is the change in IP address as it may be different as the servers may be in two different blocks of hardware.

Test and then shutdown the old m1 or m3 server.

This exercise may help reduce the running cost of the instance by up to 50%.

In our case, we could shaved off about 40% from our monthly AWS bill, without even doing the migration part.

That should give you an idea.

Bluetooth on off Switch missing in Windows 10

  Sometimes, what happens is that you are unable to switch the Bluetooth in your PC or laptop. Even if you are a professional, it gets you f...

Most Popular

Copyrighted.com Registered & Protected DWYE-NHTO-NBNH-7FFM