Reputation: 3870
Is it possible to clone a EC2 instance data and all?
Upvotes: 194
Views: 188665
Reputation: 1
To clone an EC2 instance in AWS, follow these steps:
aws ec2 create-image
and aws ec2 run-instances
).Upvotes: 0
Reputation: 165
To Answer your question: now AWS make cloning real easy see Launch instance from your Existing Instance
This will take the existing instance as a Template for the new once.
or you can also take a snapshot of the existing volume and use the snapshot with the AMI (existing one) which you ping during your instance launch
Upvotes: 10
Reputation: 2940
You can use AWS API or console UI to create an AMI(Amazon Machine Image) of your running instance. You can specify to reboot the instance when create your AMI. Then you can use AWS API or console UI to launch more instances with the AMI you created.
Upvotes: 0
Reputation: 13427
You can make an AMI of an existing instance, and then launch other instances using that AMI.
Upvotes: 157
Reputation: 22264
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.
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.
Then, you need to create a new instance and use that image as the AMI.
Upvotes: 100
Reputation: 731
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:
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
Upvotes: 35
Reputation: 2882
The easier way is through the web management console:
Once you have an image you can launch another cloned instance, data and all. :)
Upvotes: 152
Reputation: 17
You can do it very easily with a Cloud Management software -like enStratus, RightScale or Scalr (disclaimer: I work there). With the cloned farm you can:
Upvotes: -4