Amazon EC2 AMI Lifecycle (Part 3)

 





Create an instance store-backed AMI

The AMI you choose when launching your instance dictates the kind of root device volume. To generate an instance store-backed Linux AMI, begin with an instance that was launched from an existing instance store-backed Linux AMI. After personalizing the instance to meet your requirements, bundle the volume and register a new AMI, which can be used to launch additional instances with these modifications. It is not possible to create an instance-store backed Windows AMI since Windows AMIs do not support instance store for the root device.

Overview of AMI Creation

Initially, start an instance using an AMI that is similar to the one you wish to create. You can connect to your instance and modify it as needed. Once your instance is configured to your specifications, you can proceed to bundle it. The bundling process may take several minutes to finish. After this process concludes, you will have a bundle that includes an image manifest and files outlining the template for the root volume. Then, you will upload the bundle to your Amazon S3 bucket and subsequently register your AMI.

When you start an instance with the new AMI, the root volume for that instance is generated from the bundle you uploaded to Amazon S3. You will be billed for the storage space occupied by the bundle in Amazon S3 until you eliminate it.

When you attach instance store volumes to your instance alongside the root device volume, the block device mapping for the new AMI will include details about these volumes, and the block device mappings for any instances you launch from the new AMI will automatically include information regarding these volumes.

Prerequisites

Before you can create an AMI, you must complete the following tasks:

  • Install the AMI tools.

  • Install the AWS CLI.

  • Ensure that you have an S3 bucket for the bundle, and that your bucket has ACLs enabled.

  • Ensure that the files in your bundle aren't encrypted in the S3 bucket. If you require encryption for your AMI, you can use an EBS-backed AMI instead.

  • Ensure that you have your AWS account ID

  • Ensure that you have credentials to use the AWS CLI.

  • Ensure that you have an X.509 certificate and corresponding private key.

  • Connect to your instance and customize it. For example, you can install software and applications, copy data, delete temporary files, and modify the Linux configuration.

Conclusion

An instance store-backed AMI is created. 









































Comments

Popular posts from this blog

Deployment (Part 3)

Deployment (Part 1)

Deployment (Part 2)