Overview
I think skip_create_ami no image runs can avoid the source instance AMI preparation steps.
The order I observed was:
- Source instance stop starts.
- Packer waits for the instance to stop.
- The create image step later handles
skip_create_ami.
For workflows that use Packer as remote execution and collect outputs before cleanup, stopping the source instance for AMI preparation adds time without producing an image.
Reproduction shape
- Run an Amazon EBS build with
skip_create_ami = true.
- Copy outputs during the build.
- Run with
PACKER_LOG=1.
Observed order:
==> example.amazon-ebs.test: Stopping the source instance...
==> example.amazon-ebs.test: Waiting for the instance to stop...
==> example.amazon-ebs.test: Skipping AMI creation...
Measurements
The source instance stop wait in a c5.metal run took about 19m16s.
A local patch that passes skip_create_ami into the stop and modify steps skipped that stop wait. A separate cleanup wait remained, which I think should be treated as a separate concern.
Expected behavior
My theory is that skip_create_ami = true can skip AMI preparation steps because no image will be created.
Versions
Packer 1.15.1 for local plugin validation.
Amazon plugin 1.8.1 for the released plugin comparison.
Local plugin build from current main for the proposed patch.
Overview
I think
skip_create_amino image runs can avoid the source instance AMI preparation steps.The order I observed was:
skip_create_ami.For workflows that use Packer as remote execution and collect outputs before cleanup, stopping the source instance for AMI preparation adds time without producing an image.
Reproduction shape
skip_create_ami = true.PACKER_LOG=1.Observed order:
Measurements
The source instance stop wait in a
c5.metalrun took about19m16s.A local patch that passes
skip_create_amiinto the stop and modify steps skipped that stop wait. A separate cleanup wait remained, which I think should be treated as a separate concern.Expected behavior
My theory is that
skip_create_ami = truecan skip AMI preparation steps because no image will be created.Versions
Packer
1.15.1for local plugin validation.Amazon plugin
1.8.1for the released plugin comparison.Local plugin build from current
mainfor the proposed patch.