Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create copy of EC2 instance and launch as new instances

I setup one mail server in one EC2 instances. I want to copy the whole instance and launch as another new instance.

I'm very confused about snapshot and AMI, so please suggest how to do it.

like image 654
Tyrell Avatar asked Apr 06 '17 10:04

Tyrell


1 Answers

When talking about creating a copy or clone of an instance, there's two aspects to consider:

  • The configuration of the instance itself, such as Instance Type, Security Group, IAM Role and network subnet
  • The contents of the disk volume(s)

To launch an instance with the same instance configuration, use the Launch More Like This option in the actions menu, which can launch a new instance with the same configuration. This will also select the original AMI used to launch the initial instance -- please note that this means it will have the same disk as sued when launching the initial instance, but will not have a copy of all data stored/changed on the initial instance since it was first started.

If you wish to make a perfect copy of the instance, including the contents of the disk volume(s), then create an AMI (see documentation for Linux and Windows). This will make a copy of the disk volume(s) so that any instance launched from the AMI will have the same data on disk. Then, launch a new instance from that AMI.

like image 147
John Rotenstein Avatar answered Oct 12 '22 05:10

John Rotenstein