packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Support creating an AMI via a snapshot of the root volume

Open weaversam8 opened this issue 10 months ago • 0 comments

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

AWS recommends creating AMIs via a snapshot of a root EBS volume as a faster way of creating images. (This would be using the RegisterImage API rather than the CreateImage API.) Despite this potentially offering large speed improvements, this feature seems to be missing from the Amazon Packer plugin.

The amazon-ebssurrogate builder exists, but as far as I can tell, that's designed to create an AMI based on a snapshot of a volume that is not the root volume of the Packer builder instance.

Use Case(s)

  • Creating AMIs more quickly

Potential configuration

This could be implemented using a use_create_image option on the amazon-ebs builder, similar to the option that already exists on the amazon-ebssurrogate builder. The main difference is that use_create_image would need to default to true on the amazon-ebs builder to preserve existing behavior.

source "amazon-ebs" "ebs-source-abc" {
  // ...
  use_create_image = false
  // ...
}

weaversam8 avatar Dec 12 '24 18:12 weaversam8