Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon Web Service: Different between Images and Instances

What is the different between starting an AWS Image and Instances?

Example: I do notice when I am running AWS image using boto, I can only stop the Image while running AWS instance using boto, I can only terminate.

like image 561
Ezylryb Avatar asked Dec 22 '22 07:12

Ezylryb


2 Answers

Think of an EC2 instance as a single running server with CPU, memory, hard disk, networking, etc. Any changes you make to that instance affect only that instance.

Think of an AMI (Amazon Machine Image) as an exact copy of the root file system that gets copied to the hard disk when you start a new instance. The AMI is a hard disk sitting on a shelf. You make an exact copy of the hard disk on the shelf, install the new hard disk in a server, and turn the server on. You can do this for as many servers as you'd like to start without affecting the master copy.

The AMI defines the initial state of each instance. Each instance changes as it runs, but you can never change the original AMI once it has been created (other than to delete it).

There are more details that refine this conceptual model, but that's the basics.

Specific to the wording in your question:

  • Sometimes we say we're "starting an AMI" sometimes we say we're "starting an instance". We mean the same thing. We're really starting an instance using an AMI as the template.

  • We never say we're "stopping/terminating an image" or "stopping an ami" as, once started, it's really the instance that's running.

like image 140
Eric Hammond Avatar answered Mar 18 '23 06:03

Eric Hammond


You can have one or more instances running that are derived from an image (AMI). Here is a good little tutorial, that's a bit old mind you, talking about how you can convert an Instance to an AMI ... which you can then redeploy one or many times:

  • http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/

What is an AMI: Amazon Machine Image

  • http://en.wikipedia.org/wiki/Amazon_Machine_Image

Technically, you can't start an AMI. You can start an instance that is derived from an AMI.

like image 40
sdolgy Avatar answered Mar 18 '23 08:03

sdolgy