[AWS] EC2 – AMIs

AMIs (Amazon Machine Images) are containers that are used to build instances (OS + SW packages + settings).


  • Snapshots of EBS volumes are created automatically and used to create an AMI.
  • AMI stores a snapshot of EBS volumes, permissions, and a block device mapping.
  • AMIs need to have appropriate launch permissions (private, a specific account, or public).
  • AMIs can be copied to other AWS regions.
  • AMI is used with Auto Scaling to launch new servers on demand.
  • AMIs are only available in the region they are created.
  • You can select the AMI based on: Region, OS, Architecture (32, 64, Arm), Launch Permissions, Root Storage Types (EBS or Instance store volume).
  • EBS is from the snapshot, and an Instance store volume is from the template.

Types of AMIs

  • Community AMIs (free)
  • AWS Market AMIs (pay to use + additional licensed software)
  • My AMIs

EC2 Image Builder

EC2 Image builder allows you to create AMIs and container images simply through a graphical interface.

  • It validates and tests images.
    • Security compliance, AWS-provided tests, or custom tests
  • Use case:
    • You can automate image update processes such as software updates. Image Builder creates a new image, runs validation tests, and makes it available in AWS regions of your choice.

Image Pipeline

  • Image Recipe:
    • Image builder uses a recipe for each image.
    • An image can be AMI (Amazon Machine Image) or Docker Image.
  • A pipeline defines the configuration and end-to-end process.
    • Base OS (Source Image) -> Software (Build Components) -> Tests -> Distribution

How to use Image Builder

  1. Create an IAM Role: add permissions for EC2 Image Builder
  2. Create an Image Pipeline:
    • Define a recipe – configuration settings
      • Image (Output) Type: AMI or Docker Image
      • Base Image
      • Add Components
  3. Execute the Pipeline: Image Builder launches a temporary build and tests the instance.
  4. The image can be seen in the EC2 console AMIs section.


Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s