Wednesday 8 August 2018

Restoring an Amazon EBS root volume from a snapshot with ENA support

What:

Amazon Elastic Compute Cloud instance with ENA support

Problem:

You have a root volume snapshot and you want to restore m5 instance, so you create image (AMI) from it, but when trying to launch an instance m5 instance type is disabled and message says:
This instance type requires ENA support. To enable this instance type, return to the previous step and select an AMI that is enabled for ENA.

Solution:

To create AMI from snapshot with ENA support use aws cli:
aws ec2 register-image --ena-support --architecture x86_64 --block-device-mappings "[{\"DeviceName\": \"/dev/sda1\",\"Ebs\":{\"SnapshotId\": \"snap-0xxxxxxxxx\"}}]" --name "m5-restored" --root-device-name /dev/sda1 --virtualization-type hvm

Replace snap-0xxxxxxxxx with your snapshot id.

Now you just have to re-launch instance from newly created AMI.

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete