Skip to content

amazon-import -> Import as snapshot? #103

@Itxaka

Description

@Itxaka

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

Instead of only having the possibility of importing the artifacts as an amazon AMI, which has a lot of requirements, we should be able to import the artifact as a snapshot, which has almost no requirements and its not even postprocessed by aws.

It could even have an extra step to register the AMI from that snapshot afterwards thus turning the snapshot into an AMI

Use Case(s)

Any OS that does not adhere to the requirements list from importing images[0] could benefit from this. In our case this arise from building https://github.com/rancher-sandbox/cOS-toolkit and trying to use packer while building our artifacts for the different cloud providers. We tried to use amazon-import to upload the resulting OVA images but it kept failing until we used the import-snapshot method.

[0] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html

Potential configuration

{
  "type": "amazon-import",
  "access_key": "YOUR KEY HERE",
  "secret_key": "YOUR SECRET KEY HERE",
  "region": "us-east-1",
  "s3_bucket_name": "importbucket",
  "license_type": "BYOL",
+"snapshot": true,
+"register_snapshot": true,
  "tags": {
    "Description": "packer amazon-import {{timestamp}}"
  }
}

Potential References

https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html
https://docs.aws.amazon.com/cli/latest/reference/ec2/register-image.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions