This lab walks you through the steps to create an AMI from an Amazon EC2 instance. You will practice using Amazon Machine Images to launch Amazon EC2 instances and will create an AMI of your EC2 Instance.
Duration: 60 minutes
AWS Region: US East (N. Virginia) us-east-1
AMI stands for Amazon Machine Image.
It's a master image for the creation of virtual servers i.e., EC2 instances in the AWS environment.
They are like templates that are configured with an operating system and other software, which determine the user's operating environment.
AMIs are categorized according to region, operating system, system architecture (32 or 64 bit), launch permissions and whether they are backed by Amazon EBS or by the Instance Store.
AMI includes a template for the root volume required for an instance; typical example might contain an operating system, an application server and applications.
When you launch an instance, the root device volume contains the image used to boot the instance.
In the initial stages, all AMIs were backed by the Amazon EC2 Instance Store. This means the root device for an instance launched from the AMI is an Instance Store volume created from a template stored in Amazon S3.
Any data on the instance store volumes persists as-long-as the instance is running i.e., the data gets deleted once the instance is terminated.
Instance store backed instances do not support the Stop action.
If using an instance store is required, Amazon recommends distributing the data across multiple Availability Zones.
After the introduction of Amazon EBS, Amazon introduced AMIs that are backed by Amazon EBS i.e., the root device for an instance launched from the AMI is an Amazon EBS volume created from an EBS Snapshot.
Amazon recommends using EBS backed AMIs, because they launch faster and use persistent storage.
Amazon EBS backed instances can be stopped and later restarted without affecting data stored in the attached volumes.
Permissions are controlled to constrain AMIs for instance launches to the appropriate AWS accounts.
A block device mapping ensures that the correct volumes are attached to the launched instance.
Users have the facility of selecting AMI provided by AWS, the user community, or through the AWS Marketplace.
Users can also create their own AMIs and share them within the same region or across regions.
Log into the AWS Management Console.
Create an EC2 Instance.
Create a new AMI using the EC2 Instance.
Checking the newly created with AMI.
Launching the EC2 instance created with the created AMI and testing the AMI.
Validation of the lab.