Day 13.Create AMI from EC2 Instance

Published: (December 7, 2025 at 10:39 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Lab Information

The Nautilus DevOps team is migrating a portion of their infrastructure to AWS. To manage the complexity, they are breaking the migration into incremental steps. This approach allows for smoother implementation, risk mitigation, and better resource optimization.

For this task, create an AMI from an existing EC2 instance named devops-ec2 with the following requirement:

  • AMI name: devops-ec2-ami
  • Ensure the AMI reaches the available state.

Prerequisites

  • Log in to the AWS Console with your lab credentials.
  • Set the region to us-east-1.

Create the AMI

  1. Navigate to the EC2 service.
  2. Click Instances.
  3. Find and select the instance named devops-ec2.
    • Ensure it is in a running state (recommended).
  4. With devops-ec2 selected:
    • Click ActionsImage and templatesCreate image.
  5. In the Create Image form, fill in the required details:
    • Image name: devops-ec2-ami
    • Image description: (optional)
    • No reboot: Leave the default (reboot allowed) for safety.
  6. Click Create image.
    • AWS will begin generating the AMI.

Verify AMI Creation

  1. In the left EC2 menu, go to Images → AMIs.
  2. Ensure Owned by me is selected.
  3. Locate the AMI named devops-ec2-ami.
    • The initial State will be pending.
    • Wait until the state changes to available (this may take a few minutes depending on the instance size).

Resources & Next Steps

Credits

All labs are from KodeKloud. Thanks for providing them.

Back to Blog

Related posts

Read more »

Day 13: Terraform Data Sources

Data Source Think of a data source like a phone directory with a username and phone number as key‑value pairs accessed via an API. Instead of hard‑coding value...

Terraform Data Source (AWS)

What Are Terraform Data Sources? A data source in Terraform is a read‑only lookup to an existing resource. Instead of creating something new, Terraform queries...