"Every new server starts from zero." Not on AWS. If every server were installed by hand, each launch would be slow and no two machines would come out exactly the same. An AMI solves both problems: it is a ready-made template, and every server launched from it starts identical.
What an AMI is
An Amazon Machine Image (AMI) is the template an EC2 instance is launched from. It contains:
- the operating system (Amazon Linux, Ubuntu, Windows Server and so on)
- any software and configuration baked into it
- the list of volumes to attach at launch
- launch permissions: which AWS accounts are allowed to use it
You cannot launch an instance without one. Launch ten instances from the same AMI and you get ten identical servers, which is exactly what Auto Scaling relies on when it adds capacity for you.
Where AMIs come from
- AWS provides them: Amazon Linux, Windows and other base images, kept up to date.
- AWS Marketplace: images from software vendors, some free and some with a licence fee on top of the instance price.
- Community AMIs: shared publicly by other accounts. Only use ones from a publisher you trust.
- Your own: configure an instance the way you want it, then create an image from it.
Regional and private by default
An AMI lives in one Region, and its ID is different in every Region. To launch the same image somewhere else, copy it to that Region first. This matters for disaster recovery: a plan to "start up in another Region" fails if the image was never copied there.
An AMI you create is private to your account until you share it with specific accounts, with your organization, or publicly. Sharing publicly is rarely what you want. Before you share an image at all, make sure it contains no keys, passwords or customer data.
Golden images
Many teams maintain a golden image: a base AMI that is already patched, hardened and tested, with the monitoring and security agents installed. New servers start from it instead of from a raw operating system, so they boot faster and all look the same.
The common mistake is building the golden image once and forgetting it. An image is a snapshot in time, so an old image carries old vulnerabilities. Rebuild it on a schedule. EC2 Image Builder is the AWS service that automates building, testing and distributing images.
Two more details worth knowing. AMIs backed by EBS store their data as snapshots, which you pay for, so deregister images you no longer need and delete their snapshots. And whatever is specific to one server (its name, its secrets) should not be baked into the image; pass it at launch instead.
Where AI fits
Setting up a GPU server by hand means matching driver, CUDA and framework versions, which can take hours to get right. AWS Deep Learning AMIs (DLAMI) skip that step: according to the AWS documentation, they come preconfigured with NVIDIA CUDA and cuDNN and with recent releases of popular deep learning frameworks, such as PyTorch. They are available for instance types from small CPU-only instances to large multi-GPU ones.
You launch one on a GPU instance type and start training or serving a model right away. Check the DLAMI release notes for the exact framework and driver versions in each image before you depend on one.
Quick recap
- An AMI is a server template: operating system plus the software you bake in.
- It lives in one Region and is private until you share it; copy it to launch elsewhere.
- Keep a patched golden image and rebuild it regularly. For AI, Deep Learning AMIs come with drivers and frameworks installed.