I've got an AWS EC2 instance that I would like to create a spin off of in order to do some testing. I know I can create an AMI of the running instance, then launch that. But when I create the AMI, the machine goes down for a couple minutes (at least the network connection).
Is there a setting somewhere that I am missing?
I generate the AMI by right clicking the machine in the management console and selecting "Create AMI."
Thanks
There is no clone feature available in AWS EC2 service. However, you can create an image of your EC2 instance and create a new instance out of that image. You can use the Amazon Machine Image (AMI) feature of EC2 service to create an image of your EC2 instance.
Upgrading an EC2 Instance with Zero DowntimeThe best way to achieve a zero-downtime upgrade is with a blue/green deployment. This involves creating a new instance of the desired tier, readying it for production, swapping traffic over to it, then terminating the old instance.
Log in to the AWS Management Console. If required, use the region selector in the top right corner to switch to the region where your instance was launched. Select your instance and then select the “Create Image” option in the “Actions” menu.
When you stop an instance, we shut it down. We don't charge usage for a stopped instance, or data transfer fees, but we do charge for the storage for any Amazon EBS volumes. Each time you start a stopped instance we charge a minimum of one minute for usage. After one minute, we charge only for the seconds you use.
No. Not in a technical sense. The machine must reboot when you create an AMI. You are not losing network connection, your machine is actually restarting.
One thing you could do is copy your disk to another disk, but that is not easy to do.
Amazon EC2 powers down the instance, takes images of any volumes that were attached, creates and registers the AMI, and then reboots the instance. -http://docs.amazonwebservices.com/AWSEC2/2011-05-15/UserGuide/index.html?Tutorial_CreateImage.html
EDIT: I am looking at this answer again, and AWS now has the ability to check "no reboot" when creating an AMI. This is probably not a great idea for volumes with a lot of writes, but it is nice to have.
Amazon now allows a "no-reboot" option when creating an AMI, presented in a checkbox. However, the "file system integrity on the created image can't be guaranteed" so you'll have to weigh the integrity vs. downtime.
http://docs.amazonwebservices.com/AWSEC2/2011-05-15/UserGuide/index.html?Tutorial_CreateImage.html
http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-CreateImage.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With