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

Add support for fast snapshot restore

Open ziggythehamster opened this issue 11 months ago • 2 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

When images are taken and snapshots copied, Packer users should be able to enable EBS fast snapshot restore on those snapshots for some list of availability zones. Note that the list of AZs would be per snapshot, which could span regions, so the configuration syntax might get a little hairy.

Use Case(s)

Make instance launches not suffer from the degraded performance that comes with launching from an AMI or EBS snapshot while the volume is initializing.

Potential configuration

source "amazon-ebssurrogate" "foo" {
  ami_regions = ["us-east-1", "us-west-2"]

  ami_fast_snapshot_restore {
    region             = "us-east-1"
    availability_zones = ["us-east-1a", "us-east-1b"]
  }

  ami_fast_snapshot_restore {
    region             = "us-west-2"
    availability_zones = ["us-west-2a", "us-west-2b"]
  }
}

Potential References

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html

ziggythehamster avatar Mar 05 '24 01:03 ziggythehamster