Skip to content
tezvyn:

What a machine image is and why it matters

Source: interviewEasyHow cards are made

Summary

understanding of immutable, reproducible infrastructure.

Key points

an image is a frozen template of OS, software, and config; it makes launches identical and fast.

Watch out for

confusing an image with a running instance or a live backup snapshot.

What's really being asked

The interviewer is checking whether you understand the difference between a template and a running resource, and why immutable images underpin elastic, reproducible infrastructure.

The full answer

Define the image as a read-only template that captures the operating system, installed packages, application code, and configuration at a point in time. AWS calls it an AMI, Azure offers managed images and the Shared Image Gallery, and GCP uses custom images. Launching from an image yields an identical instance without re-running install steps, so it is fast and deterministic. That speed and sameness is exactly what auto-scaling depends on: when load rises, the scaling group launches new instances from one image, and every node is byte-identical to its peers. This also enables immutable infrastructure, where you replace instances instead of patching them in place.

The mistakes people make

Describing an image as a running VM rather than a template. Treating it as merely a backup, ignoring its role in fleet provisioning. Baking secrets, hostnames, or per-instance state into the image, which breaks reproducibility and creates security risk.

What usually comes next

How do you build and version images, for example with Packer. What goes in the image versus in user-data or a config management step. How do you keep images patched and avoid drift. How do golden images interact with launch templates.

A concrete example

A team uses Packer to bake a golden image containing the OS, the app server, and the application binary, tagged with a version. Their auto-scaling group references a launch template pointing at that image. When traffic spikes, the group launches five new instances from the image in under a minute, each identical and ready to serve, with secrets pulled at boot from a secrets manager rather than embedded in the image.

Interview question

Why does a machine image enable fast, reliable auto-scaling more than manually configuring each new instance?

  • a.Images let every launched instance be identical and ready without setup stepsCorrect
  • b.Images are stored regionally so they bypass network limits
  • c.Images automatically scale CPU based on demand
  • d.Images compress the OS so instances boot using less memory
Why?

An image is a frozen template, so each instance launches identical and pre-provisioned, which is what makes scaling fast and deterministic. Images do not compress memory, bypass networking, or scale CPU on their own.

Just read this? Test yourself on what you have been reading.

Read the original → docs.aws.amazon.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles