Showing posts with label Scalability. Show all posts
Showing posts with label Scalability. Show all posts

May 26, 2017

Migrate EC2 Instances from one account to another (same region)




There are a lot of cases, which I encounter every now and then and do not find solutions easily and I have to refer to books that are available with me or on the Internet. One such scenario that I faced recently was that I had a development instance (in my aws account) and I had to create an instance for client and install/deploy all required packages/app etc (in his aws account). At that point I was wondering if there is some way to simply transfer the instance to other account (I was using my personal AWS account for development purposes and had to create/configure instance in client’s account).  Being lazy to the core I just didn't wanted to create an instance and do the rework. 

Lot of times I was regretting not asking client to provide infra for development purposes as well. A lot was going through my mind like “Why I didn’t used docker”, “ Why I didn’t note down all configuration steps”, “Should I write Ansible script to make it easier”. While I was thinking all this and searching web at the same time I came across several answers (on stackoverflow) where it was mentioned how snapshots can be used to create new instances etc.

At that point I decided to explore AWS Console a bit more deeply and decided to play around with it while referring to documentation as well and very soon I was able to migrate instance across accounts in same region.

I am sharing steps below in hope of helping others :
Pre-requisite :
-       You should be able to access the support section of destination account (more on this below).

Step 1: Log into source account and go to EC2.
Step 2: Select the instance that you want to migrate.



Step 3: Create an AMI and give it a name or description that its easier to understand. I named my AMI as devmigrate20may17.



Step 4: Click on Create Image and wait for snapshot to appear in Snapshots section in the same region.

Step 5: Select the snapshot and create image from it.


Step 6: Keep all the values as default and give a descriptive name.



Step 7: Once the Image is created, go to AMI section and select the newly created image.  In lower half note “Permissions” tab, click on that.







Step 8: You will notice that AMI’s are by default private. (Most will get excited at this point). Yes , we can edit and make it public.


Step 9: At this point we need account number of destination account, you can find account number in support section in top right corner copy that account number and paste it in the box. There are two options here to make AMI public i.e it will be visible to everybody and to make it visible to the account number we specify. We will go with the second option for obvious reasons.

Step 10: Log into destination account Go to Images -> AMI and select “Private Images” from drop down filter. Here you will see the AMI and from this AMI you can simply launch an instance.

I hope this post help people like me who needed to migrate instance from one account to another.

Do share your feedback and if you think its helpful, please share it with others as well.

Sep 4, 2010

Build you own Highly Available Cluster with 'Wackamole' and 'Spread'

By :


Yair Amir
Ryan Caudy
Ashima Munjal
Theo Schlossnagle









This application works on a bunch of virtaul IPs and sees that all these IP remain available on a bunch of machines hosting these IP's. Constraint is that these bunch of machines should be on same LAN. If one machine goes down 'Wackamole' ensures that rest of the machines take over those IP's and all 20 IP remain visible to outer world at all times.

More to come....

Aug 29, 2010

What is Fault Tolerance ?

An application having n software modules and n servers is able to function properly even if any of the server or module fails is known as 'fault tolerant'.

What is five nine's availability ?

Very commonly we come across the figure 99.999 % uptime or availabilty. But what actually does it means in practical terms. Here is the explanation :
60 seconds * 60 minutes * 24 hours * 365 = 31,536,000 seconds.in a year
99.999/100*31,536,000 = 31535684.64 seconds
Now : 31,536,000 - 31,536,000 = 315.36 seconds of downtime or approximately 6 minutes of downtime in a year.

What is Scalability ?

In common terms, you develop an application expecting that it will at max can have a concurrency of 100 users or approx. 3000 hits per day and contrary to that, same application starts to get hit in excess of 10000 users daily and is increasing by day. 

If you are able to cover up this increase in no.of users by adding more machines then you are doing 'Horizontal Scaling' on the other hand if you are adding up more powerful CPU or RAM then you are doing 'Vertical Scaling'. Hence, scaling is nothing but increasing resources to accommodate the increase in load.
When a system or web application is able or flexible enough to allow this increase in resources it is known as 'Scalable' and is known to have 'Scalability'.