Day 13.Create AMI from EC2 Instance
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
- Navigate to the EC2 service.
- Click Instances.
- Find and select the instance named devops-ec2.
- Ensure it is in a running state (recommended).
- With devops-ec2 selected:
- Click Actions → Image and templates → Create image.
- 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.
- Image name:
- Click Create image.
- AWS will begin generating the AMI.
Verify AMI Creation
- In the left EC2 menu, go to Images → AMIs.
- Ensure Owned by me is selected.
- 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
- Full Code Repository: KodeKloud Learning Labs
- More Deep Dives: Whispering Cloud Insights
- Join Discussion: DEV Community
Credits
All labs are from KodeKloud. Thanks for providing them.