The configuration model
Components use AWS Task Orchestrator and Executor documents. Ordering matters because Image Builder applies components in recipe order.
Recipes use semantic versions and cannot be overwritten. Wildcard references can resolve newer dependencies during later runs. Pin exact versions when auditability matters more than automatic updates.
A versioned recipe is reproducible only when its base image, components, and external artifacts are also pinned.
The AMI build and test flow
- Image Builder resolves the recipe and configurations.
- It launches a temporary build instance from the base AMI.
- AWSTOE runs build components.
- Image Builder creates an intermediate AMI.
- If tests are enabled, it launches a separate instance from that AMI.
- Test components verify the image after boot.
- A successful image enters distribution.
- Temporary instances terminate; AMIs, snapshots, and logs remain.
Hardening without false certainty
Image Builder automates hardening but does not certify an AMI as universally safe. AWS-managed components can apply updates, custom components can enforce controls, and Amazon Inspector can scan supported images. Treat components as privileged code. Pin external artifacts by digest or verified version, validate signatures or checksums, remove transient credentials and caches, and never bake reusable secrets into the image. Hardening combines a trusted base, reviewed components, constrained permissions, explicit tests, findings, and controlled distribution.Distribution and promotion
Distribution configurations can copy AMIs to Regions, grant launch permissions, set names, and update launch templates. Cross-Region copies create distinct AMIs and snapshots. Build once, retain the artifact, and promote the same output after validation. Rebuilding from moving inputs creates another artifact and should be treated as another release. Distribution copies an approved artifact; it does not make quotas or runtime dependencies identical across Regions.Logging and failure evidence
Image Builder can send pipeline logs to CloudWatch Logs and component output to S3. EventBridge exposes state changes, and SNS can notify outcomes. A pipeline status is only a summary. Component logs and underlying EC2, Systems Manager, IAM, Inspector, S3, and ECR events explain failures. Set explicit retention. Output AMIs and snapshots do not disappear because a pipeline is disabled or deleted.Cost boundaries
Image Builder itself has no additional service charge. Standard charges apply to temporary EC2 instances, EBS, snapshots, S3 logs, ECR, Inspector, and data transfer. Cross-Region copies multiply snapshot storage. A stopped pipeline costs nothing to orchestrate, but retained images, snapshots, logs, and layers continue accruing charges. Right-size builders, shorten builds, set log retention, remove superseded artifacts, and distribute only where needed.Frequently asked questions
Does Image Builder patch running EC2 instances?
Does Image Builder patch running EC2 instances?
No. Image Builder produces new AMIs or container images. Replacing running instances is a separate deployment concern handled by an Auto Scaling group, launch template rollout, instance refresh, or another system that consumes the new image.
Are recipes enough for reproducible builds?
Are recipes enough for reproducible builds?
Not always. Recipes preserve declared configuration, but wildcard versions and external repositories can move. Pin exact components and artifacts, record resolved inputs, verify downloads, and retain the resulting AMI rather than rebuilding it for promotion.
What remains after a pipeline run?
What remains after a pipeline run?
Output AMIs, backing EBS snapshots, Regional copies, configured logs, and published container images remain. Temporary build and test instances terminate. Lifecycle automation must remove superseded artifacts without deleting versions still referenced by deployments.