01 / 03

What is an AMI?

Difficulty: 3/10
EC2 instance launch, image management, deployment automation

Introduction to Amazon Machine Images

An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS that provides the information required to launch an instance. It serves as a master template for the root volume of the instance, containing the operating system, an application server, and applications.

Components of an AMI
  1. 1

    A template for the root volume for the instance (e.g., OS, application server).

  2. 2

    Launch permissions that control which AWS accounts can use the AMI to launch instances.

  3. 3

    A block device mapping that specifies the volumes to attach to the instance when it's launched.

Scenario Questions

0-2 years experience

  1. 1You need to spin up a new EC2 instance for a web service. How would you use an AMI in that process?
  2. 2If you launch an instance from a custom AMI you created yesterday, what happens to the instance if you later update the source code on the original machine?

2-5 years experience

  1. 1Our deployment pipeline builds a new AMI for each release. Yesterday the new AMI failed to start due to missing drivers. How would you troubleshoot the issue?
  2. 2We have a mix of on‑demand and spot instances using the same AMI. What trade‑offs should we consider when updating the AMI across these fleets?
  3. 3Explain how you would roll back to a previous version of an AMI without affecting running instances.

5-8 years experience

  1. 1We need to serve traffic in multiple regions and want to keep AMI versions in sync. What design would you propose to manage AMI replication and versioning at scale?
  2. 2Our security team requires that all AMIs be scanned for vulnerabilities before use. How would you integrate scanning into the AMI lifecycle while minimizing deployment latency?
  3. 3Discuss the performance and cost implications of using large, pre‑baked AMIs versus lightweight base images with user‑data scripts.

8+ years experience

  1. 1Our organization is migrating from a monolithic application to microservices, each with its own AMI. How would you design a cross‑team AMI governance model to ensure consistency, compliance, and efficient updates?
  2. 2We have legacy workloads that rely on outdated OS versions baked into AMIs. What strategy would you recommend for gradually deprecating these AMIs while maintaining service continuity?
  3. 3Consider a scenario where multiple product teams share a common base AMI that they customize. How would you architect a versioning and CI/CD pipeline to avoid dependency hell and support independent releases?

Follow-up Questions

  • Can you walk me through the steps you'd take in the AWS console or CLI?
  • What are the security implications of sharing AMIs across accounts?
  • How would you handle AMI cleanup to avoid unnecessary storage costs?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.