Amazon Web Service: Different Between Images and Instances

What is the difference between launching an AWS image and instances?

Example: I notice when I start AWS image using boto, I can only stop the image when I start the AWS instance using boto, I can only stop .

+4
source share
2 answers

Think of an EC2 instance as a single running server with a processor, memory, hard drive, network interface, etc. Any changes you make to this instance only affect that instance.

Think of AMI (Amazon Machine Image) as an exact copy of the root file system, which is copied to the hard drive when you start a new instance. AMI is a hard drive sitting on a shelf. You make an exact copy of the hard drive on the shelf, install a new hard drive on the server and turn on the server. You can do this on as many servers as you want to start without affecting the main copy.

AMI defines the initial state of each instance. Each instance changes as it starts, but you can never change the original AMI after creating it (other than deleting it).

There is more detailed information that clarifies this conceptual model, but what is the basics.

Specifically for the wording in your question:

  • Sometimes we say that we are “starting an AMI”, sometimes we say that we are “starting an instance”. We mean the same thing. We are really launching an instance using AMI as a template.

  • We never say that we “stop / end the image” or “stop the ami”, because as soon as it starts, it is really an executable instance.

+9
source

You can have one or more instances running from an image (AMI). Here's a nice little tutorial that is a little dated from you, talking about how you can convert an instance to AMI ... which you can then redeploy one or more times:

What is AMI: Amazon Machine Image

Technically, you cannot run AMI. You can run an instance obtained from AMI.

+2
source

All Articles