Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 Instance Cloning

People also ask

How do I create an EC2 instance from another EC2 instance?

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances. Select the instance you want to use, and then choose Actions, Launch More Like This. The launch wizard opens on the Review Instance Launch page.

How do I clone an AWS environment?

AWS management console If you have many environments, use the search bar to filter the environment list. On the environment overview page, choose Environment actions, and then do one of the following: Choose Clone environment to clone the environment without any changes to the platform version.


You can make an AMI of an existing instance, and then launch other instances using that AMI.


The easier way is through the web management console:

  1. go to the instance
  2. select the instance and click on instance action
  3. create image

Once you have an image you can launch another cloned instance, data and all. :)


There is no explicit Clone button. Basically what you do is create an image, or snapshot of an existing EC2 instance, and then spin up a new instance using that snapshot.

First create an image from an existing EC2 instance.

enter image description here


Check your snapshots list to see if the process is completed. This usually takes around 20 minutes depending on how large your instance drive is.

enter image description here


Then, you need to create a new instance and use that image as the AMI.

enter image description here

enter image description here


Nowadays it is even easier to clone the machine with EBS-backed instances released a while ago. This is how we do it in BitNami Cloud Hosting. Basically you just take a snapshot of the instance which can be used later to launch a new server. You can do it either using AWS console (saving the EBS-backed instance as AWS AMI) or using the EC2 API tools:

  • create a snapshot with ec2-create-snapshot
  • and then launch an instance from a snapshot

Cloning the instance is nothing else but creating the backup and then launching a new server based on that. You can find bunch of articles out there describing this problem, try to find the info about "how to ..." backup or resize the whole EC2 instance, for example this blog is a really good place to start: alestic.com