Error: Failed to initialize build "amazon-ebs" (Packer)
Fixes Packer failing to start a build because the builder plugin isn't installed. For engineers on Packer 1.10+ whose amazon-ebs builds fail immediately, the fix is installing the plugin.
Error: Failed to initialize build "amazon-ebs" (Packer)
TL;DR
The amazon plugin is not installed. Add the required_plugins block and run packer init ., or packer plugins install github.com/hashicorp/amazon directly.
The error
Error: Failed to initialize build "amazon-ebs"
The builder amazon-ebs is unknown by Packer, and is likely part of a plugin that
is not installed.
You may find the needed plugin along with installation instructions documented
on the Packer integrations page.Fix it
- Add the plugin requirement to your template:
packer {
required_plugins {
amazon = { version = ">= 1.0.0", source = "github.com/hashicorp/amazon" }
}
}- Success check: the block is present and the source address is spelled correctly.
- Run
packer init .in the template directory.
- Success check: the plugin downloads and installs.
- Or install directly:
packer plugins install github.com/hashicorp/amazon.
- Success check:
packer plugins installedlists it.
- Re-run
packer build.
- Success check: the build initializes instead of failing instantly.
When to use this
You hit this immediately on packer build or packer validate with Packer 1.10+, before any AWS calls.
When NOT to use this
Do not use this for Plugin not found during packer init (that is a download/source problem) or for unknown source types in HCL (label mismatch).
Compatibility
Packer 1.10+. Earlier versions bundled these builders.
Variants
Failed to initialize build "[other-builder]"for googlecompute, azure-arm, etc. (install the matching plugin)- The same error in CI where
packer initwas skipped
Root cause
Packer 1.10 removed the bundled builders. Every builder now comes from a plugin that must be installed via packer init or packer plugins install.
Edge cases
packer initmust run in the directory with the templates, or point it at the right path.- Version constraints that match nothing produce a different (download) error. Keep them satisfiable.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.