Skip to content
Pablo Rodriguez

Choosing Ami

An AMI provides the information needed to launch an instance, including:

  • Template for the root volume: Contains the guest operating system (OS) and perhaps other installed software
  • Launch permissions: Controls who can access the AMI
  • Block device mappings: Specifies any storage volumes to attach to the instance

Repeatability

An AMI can be used repeatedly to launch instances with efficiency and precision

Reusability

Instances launched from the same AMI are identically configured

Recoverability

You can create an AMI from a configured instance as a restorable backup. You can replace a failed instance by launching a new instance from the same AMI

Choose an AMI based on the following characteristics:

  • Region: Each AMI exists in a specific Region
  • Operating system: Microsoft Windows or a variant of Linux
  • Storage type of the root device: Amazon EBS-backed or instance store-backed
  • Architecture: 32-bit or 64-bit, and either x86 or Advanced RISC Machine (ARM) instruction set
  • Virtualization type: For best performance, use an AMI with a Hardware Virtual Machine (HVM) virtualization type
  • Quick Start: Linux and Microsoft Windows AMIs provided by AWS
  • My AMIs: Any AMIs that you create
  • AWS Marketplace: Pre-configured templates from third parties
  • Community AMIs: AMIs shared by others. Use at your own risk

Instance Store-backed versus Amazon EBS-backed AMI

Section titled “Instance Store-backed versus Amazon EBS-backed AMI”
CharacteristicAmazon EBS-Backed InstanceInstance Store-Backed Instance
Boot timeBoots fasterTakes longer to boot
Maximum size of root device16 TiB10 GiB
Ability to stop the instanceCan stop the instanceCannot be in a stopped state; instances are running or terminated
Ability to change instance typeCan change the instance type by stopping instanceCan’t change the instance type because the instance can’t be stopped
Instance chargesCharged for instance usage, EBS volume usage, and storing AMI as an EBS snapshotCharged for instance usage and storing AMI in Amazon S3
Use casePersistent storageTemporary storage

The lifecycle includes these states:

  • Pending: Instance is being provisioned and booting
  • Running: Instance is fully booted and ready for use
  • Rebooting: Instance stays on the same physical host, maintains public DNS name and public IP address
  • Stopping: (EBS-backed only) Instance enters stopping state before reaching stopped state
  • Stopped: (EBS-backed only) Instance is stopped but can be restarted
  • Shutting down: Instance is being terminated
  • Terminated: Instance is terminated and cannot be recovered

Important Instance store-backed instances cannot be stopped, only rebooted or terminated.

Process for creating a new AMI:

  1. Start with source AMI: Use existing AMI (Quick Start, imported VM, etc.)
  2. Launch EC2 instance: Create an unmodified instance from source AMI
  3. Configure golden instance: Install and configure specific OS and application settings
  4. Capture new AMI: Create image for EBS-backed or bundle for instance store-backed
  5. Optional: Copy AMI to other Regions for multi-region deployment
AWS Service

EC2 Image Builder automates the creation, management, and deployment of up-to-date and compliant golden VM images:

  • Provides a graphical interface to create image-building pipelines
  • Creates and maintains Amazon EC2 AMIs and on-premises VM images
  • Produces secure, validated, and up-to-date images
  • Enforces version control

Benefits include creating images with only essential components, reducing security vulnerability exposure, and providing validation testing capabilities before production use.

An AMI provides the information needed to launch an EC2 instance. Benefits of AMIs include repeatability, reusability, and recoverability. For best performance, use an AMI with the HVM virtualization type. Multiple sources are available for obtaining AMIs including Quick Start, Community AMIs, AWS Marketplace, and My AMIs that store AMIs you create.