You are on page 1of 5

AWS AMIs (Amazon Machine Images)

Hello everyone, in this video we will be covering AWS AMIs or Amazon Machine Images. We will see
what these AMIs are, create some of them, and launch instances from them.

What is an AMI?

An AMI is a supported and maintained image from AWS that is used to launch EC2 instances. You
can launch multiple instances from a single AMI. These AMIs can be created from your running or
stopped instances.

Types of AMIs

There are different types of AMIs that AWS offers:

1. Amazon provided AMIs: These are provided by AWS only.

2. Marketplace AMIs: These are created by some third party and approved by AWS.

3. Community AMIs: These are again created by third party but not approved by AWS.

4. Custom AMIs: These are the AMIs which we create for our use.

What is included in an AMI?

An AMI includes:

 One or more EBS volume snapshots or in case of instance store-backed AMIs, a template for
the root volume.

 Launch permissions that specify which account can launch or use your AMIs.

 Blocked device mapping that specifies the volume attached to the instance.
Creating an AMI

There are two ways to create an AMI:

EBS-backed AMIs

If your instance is EBS-backed, you can create an AMI by following these steps:

1. Start an instance with the existing AMI.

2. Customize the instance as per your requirement (install software, keep files, etc.).

3. Create a new AMI from the customized instance.

4. Use the new AMI to launch new instances.

Instance store-backed AMIs

If your instance has an instance volume attached, you can create an AMI by following these steps:

1. Launch an instance using the AMI base AMI.

2. Connect to your instance and customize it.

3. Create a bundle for the instance.

4. Upload the bundle to S3.

5. Create an AMI for the bundle.


6. Launch instances from the AMI.

That's all for the theoretical part. Now, let's move on to the AWS console and create an EBS-backed
AMI.

<details> <summary>Demo</summary>

 Go to the AWS console and open the EC2 dashboard.

 Scroll down to the Images and AMIs section.

 Here you can see all the AMIs.

 Now, let's create a new instance.

 Once the instance is up, connect to it.

 Create a new file.

 Now, let's create an AMI from this instance.

 Go to the Actions menu, select Images, and then Create Image.

 Fill in the details and create the AMI.

 Once the AMI is created, you can see it in the AMIs section.

 You can also copy the AMI to another region.

 Now, let's launch a new instance from this AMI.

 Select the AMI and click on Launch Instance.

 Change the necessary details and launch the instance.

Creating an AMI of a Windows EC2 Instance:

1. Launch an instance from an AMI that's similar to the AMI you want to create.

2. Customize the instance as needed (e.g. install software, attach additional EBS volumes,
create new user accounts, etc.).

3. Go to the EC2 Console and navigate to the "Instances" section.

4. Select the instance you want to create an AMI from.

5. Choose "Actions" > "Image and templates" > "Create image".

6. Specify a unique name and description for the image.

7. Choose "Create image".

Creating an AMI of a Linux EC2 Instance:

1. Launch an instance from an existing EBS-backed Linux AMI.

2. Customize the instance as needed (e.g. install software, attach additional EBS volumes, etc.).

3. Go to the EC2 Console and navigate to the "Instances" section.

4. Select the instance you want to create an AMI from.


5. Choose "Actions" > "Image and templates" > "Create image".

6. Specify a unique name and description for the image.

7. Choose "Create image".

You might also like