# Golden image

> A pre-built, approved server template that every new machine is copied from.

- Level: Advanced
- Topics: Cloud
- URL: https://tidbit.legios.com.ar/golden-image/
- In Spanish: [Golden image](https://tidbit.legios.com.ar/es/golden-image/)

A **golden image** is a saved copy of a fully prepared server: operating system, security patches, settings, monitoring agents and often the application itself, all baked in and approved. Instead of starting each new virtual machine blank and setting it up afterward, you launch it from this template, so it is ready in minutes and identical to every other copy. On AWS the image format is called an AMI (Amazon Machine Image); other clouds and platforms like VMware have their own.

Good golden images are built by a pipeline, not by hand. A tool such as HashiCorp Packer or EC2 Image Builder starts a temporary machine, runs the setup scripts, runs tests and security scans, and saves the result as a new numbered version. The pipeline runs again whenever new patches come out, so the image does not go stale, and old versions are retired.

This fits the idea of immutable infrastructure: you do not patch running servers, you replace them with fresh ones made from the newer image. It makes autoscaling faster, since new machines do not spend minutes installing things, and it keeps fleets predictable. The trade-off is discipline: every change, even a tiny one, means building and rolling out a new image, and someone has to own the pipeline. Container images follow the same idea.

## An analogy

Like a master key at a locksmith: you do not carve each new key from scratch, you copy the approved master. When the lock changes, you cut a new master and replace the copies.

## Keep in mind

- A pre-built, tested server template that new machines start from.
- On AWS it is an AMI; Packer and EC2 Image Builder build them.
- Rebuilt regularly so new patches are always included.
- Servers get replaced with fresh copies instead of patched in place.

## Go deeper

- [What is a golden image? (Red Hat)](https://www.redhat.com/en/topics/linux/what-is-a-golden-image)
- [Introduction to Packer (HashiCorp)](https://developer.hashicorp.com/packer/docs/intro)
- [What is EC2 Image Builder? (AWS docs)](https://docs.aws.amazon.com/imagebuilder/latest/userguide/what-is-image-builder.html)

## Related terms

- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [Operating system](https://tidbit.legios.com.ar/operating-system/): The base software that runs a device and lets every app share its hardware.
- [Vulnerability and CVE](https://tidbit.legios.com.ar/vulnerability-and-cve/): A flaw that lets an attacker misuse software, and the public id that names it.
- [AI agent](https://tidbit.legios.com.ar/ai-agent/): An LLM that can take actions, check the results and keep going until the job is done.
- [Virtual machine](https://tidbit.legios.com.ar/virtual-machine/): A complete computer made of software, running inside a real one.
- [Amazon](https://tidbit.legios.com.ar/amazon/): An online store with its own delivery network, and the company that runs AWS.
- [Amazon EC2](https://tidbit.legios.com.ar/amazon-ec2/): Virtual computers you rent by the hour, in any size, and switch off when done.
- [Autoscaling](https://tidbit.legios.com.ar/autoscaling/): Adding and removing servers automatically as demand goes up and down.
