How can I migrate a Windows Lightsail instance to an Amazon EC2 instance to troubleshoot?

3 minute read
0

I have an Amazon Lightsail instance that runs on Windows that I need to troubleshoot. I want to migrate the Lightsail instance to an Amazon Elastic Compute Cloud (Amazon EC2) instance.

Short description

To connect to and troubleshoot a unreachable Lightsail instance, create a snapshot of your Lightsail instance, and then export it to Amazon EC2.

To export your Lightsail instance to Amazon EC2 for non-troubleshooting reasons, see Create a snapshot of your Lightsail Windows Server instance.

Important:

  • The exported snapshot doesn't retain the public or private IP address from the Lightsail instance.
  • The export process works only one way. You can't export instances from Amazon EC2 to Lightsail.
  • For Windows Server 2016 and later Windows operating systems, you might receive an error message the first time you log in to the instance. The error reads "Password not available." To resolve this issue, use the same credentials that you used for the Lightsail instance to log in to the EC2 instance. Change the password after the initial login.

Resolution

Create a Lightsail snapshot and export it

To create and export a Lightsail snapshot, complete the following steps:

  1. Open the Amazon Lightsail console.
  2. Create a snapshot of the Lightsail instance.
  3. Open the Snapshots tab of the home page. Expand the dropdown list for your Lightsail instance.
  4. Open the snapshot menu (the vertical dots), and then choose Export to Amazon EC2.
  5. Review the information in the dialog box, and then choose Yes, Continue.

Note: Based on the size and configuration of the source Lightsail instance or block storage disk, the export might run for a long time. To check the progress of your export, choose the two gears icon to access Task Monitor. Then, select your task name from the dropdown menu.

Create a new EC2 instance from the exported snapshot

To use the exported snapshot to create a new EC2 instance, complete the following steps:

  1. Open the Amazon EC2 console.
  2. Choose AMIs.
  3. Select the exported Amazon Machine Image (AMI), and then choose Launch.
  4. Choose the instance type, and networking configurations for the EC2 instance.
    Note: If you don't have an existing key pair, then choose Create a new key pair. Create the key pair, download it, and then launch the instance. For more information, see Amazon EC2 key pairs and Amazon EC2 instances.
  5. After the instance runs and passes status checks, you can connect to it.

Troubleshoot or recover data from the Lightsail snapshot

To recover data from your Lightsail snapshot, complete the following steps:

  1. Launch a Windows EC2 instance in the same AWS Region as the exported snapshot. This is your helper instance. Note the Availability Zone that the instance is launched in.
  2. Choose Snapshots, and then select the snapshot.
  3. Select Actions, Create Volume. Be sure to create the volume in the same Availability Zone as the helper instance.
  4. After the volume is in the available state, choose Actions, Attach to attach the volume to the helper instance.
  5. Connect to the helper instance, and then open Disk Management.
  6. Bring the secondary volume online to investigate or retrieve your data.
AWS OFFICIAL
AWS OFFICIALUpdated 11 days ago