Instiq
Chapter 3 · Deployment, Provisioning, and Automation·v2.0.0·Updated 6/3/2026·~8 min

What's changed: Deepened SOA-C02 Chapter 3 to Associate depth (tables, scenarios, FAQ, traps; localized figures)

3.3Consistent Instances (AMIs and Launch Templates)

Key points

Understand consistent, fast provisioning: golden AMIs (prebaked), launch templates (AMI + type + user data), and bootstrap via user data.

To scale identical instances fast and reliably, bake the config into an image and template. Use an AMI and a launch template.

3.3.1AMIs and launch templates

Diagram showing golden AMI (prebaked OS + software) → launch template (AMI + instance type + user data) → ASG/instances (identical, fast boot): bake an AMI, reference it in a launch template for consistent instances.
AMI and launch template
  • Golden AMI: a prebaked image of OS + software; speeds boot and unifies config.
  • Launch template: bundles AMI, instance type, user data, etc.; referenced by an ASG.
  • User data: runs a script at boot for initial setup (bootstrapping).
Exam point

Common on SOA: fast boot/uniform config = golden AMI, ASG launch config = launch template (launch configurations are legacy), boot-time script = user data. You may be asked whether to bake into an AMI or configure via user data.

For consistent, fast scaling, decide "what to bake into the AMI vs. inject at boot." A golden AMI prebakes OS, middleware, and dependencies—booting fast and eliminating config drift (rebuild periodically with patches to update). EC2 Image Builder helps automate AMI builds. A launch template bundles the AMI, instance type, key pair, security groups, and user data, is versioned, and is the recommended launch config (the old launch configuration is legacy/deprecated). An ASG references the launch template and can mix instance types and Spot/On-Demand. User data is bootstrapping that runs a script on first boot; fetch per-environment config (endpoints, flags) from Parameter Store so one AMI is reusable. AMIs are per-Region, so cross-region rollout needs an AMI copy. Share via launch permissions/private sharing, and deprecate/deregister stale generations to avoid cost and confusion.

ElementRole
Golden AMIPrebake OS+deps; fast boot
Launch templateVersioned launch config (recommended)
Launch configuration (legacy)Deprecated; migrate to templates
User dataBoot-time bootstrapping
Example

Scenario: scale-out is slow and configs vary. Bake middleware/dependencies into a golden AMI (auto-built with EC2 Image Builder) to cut boot time. Point the ASG at a launch template (migrated from a launch configuration), and inject per-environment differences via user data + Parameter Store. Roll out to other regions with an AMI copy.

Note

Q. Fast boot/uniform config? Golden AMI. Q. ASG launch config? Launch template (launch configurations are legacy). Q. Boot-time script? User data. Q. Per-environment config? Inject from Parameter Store. Q. Other regions? AMI copy.

Warning

Watch the mix-ups: (1) Use launch templates for new work (launch configurations are legacy and miss new features). (2) AMIs are per-Region—copy them for other regions. (3) Configuring everything via user data slows boot—bake stable deps into the AMI. (4) Leaving old AMIs/snapshots around raises cost; manage generations (deprecate/deregister).

Tip

Bake stable dependencies into the AMI and inject per-environment config via user data or Parameter Store to balance speed and flexibility.

3.3.2Section summary

  • Consistent, fast provisioning with golden AMI + launch template
  • Boot-time config via user data

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. What is a prebaked OS + software image used to speed boot and unify configuration?

Q2. Which is the recommended launch configuration an Auto Scaling group references to launch instances?

Q3. You want to run a script at EC2 boot for initial setup. What do you use?

Check your understandingPractice questions for Chapter 3: Deployment, Provisioning, and Automation