This page is under regular updates. Please check back later for more content.
Compute
Elastic Compute Cloud
AMIs

AMI (Amazon Machine Image)

  • An Amazon Machine Image (AMI) provides the information required to launch an instance.
  • It act as a ISO file for the instance that is going to be launched.
  • You must specify an AMI when you launch an instance.
  • You can launch multiple instances from a single AMI when you need multiple instances with the same configuration.
  • You can use different AMIs to launch instances when you need instances with different configurations.

AMI features

  • AMIs are encrypted by default using the AWS Key Management Service (KMS).
  • You can share AMIs with other AWS accounts or make them public.
  • You can create an AMI from an instance and launch instances from the AMI.
  • You can copy an AMI to another region and launch instances from the copied AMI.

Creating an AMI

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ (opens in a new tab).
  2. In the navigation pane, choose Instances.
  3. Select the instance from which you want to create an AMI.
  4. Choose Actions, Image and templates, Create image.
  5. Enter a Name and Description for the AMI.
  6. Choose Create image.

AMI vs. Launch Template

FeatureAMI (Amazon Machine Image)Launch Template
Primary PurposeStores a pre-configured virtual machine image, including the OS, applications, and settings. Acts as the "content" of the instance.Provides reusable configuration information for launching instances, such as instance type, network settings, and optional AMI reference. Acts as a "blueprint."
FunctionalityActs as the "source" from which the instance's disk and OS are built. Comparable to an ISO or disk image.Standardizes launch settings, supports versioning, and allows for consistent instance configurations.
Required InputsMust specify an AMI every time you launch an instance unless included in a launch template or Auto Scaling group.Can include AMI ID along with other configurations (e.g., instance type, key pairs, security groups) to streamline launches.
ReusabilityCan describe only the machine's disk state (OS, software, etc.).Supports reusability with versioning, enabling different configurations (e.g., dev, staging, production) while referencing the same or different AMIs.
Instance ConfigurationDefines the OS, applications, and software environment of the instance.Defines broader settings, including network, instance type, user data, and optionally the AMI.
Launching Multiple InstancesYou can launch multiple instances from a single AMI when the same configuration is required.You can launch multiple instances from a single launch template with consistent settings, which can include referencing the same or different AMIs.
Flexibility for Different ConfigurationsUse different AMIs to launch instances when varied configurations (e.g., OS or software) are needed.Use different launch templates to standardize and manage varied instance configurations (e.g., dev vs. prod) while potentially using the same or different AMIs.
EncryptionAMIs are encrypted by default if you enable default encryption for EBS volumes in your AWS account.Launch templates themselves are not encrypted by default, but they can reference encrypted AMIs or volumes.