If you cannot log into an AWS instance and want to inspect files on it, you can detach the volume from the lost instance and attach it to another instance as the secondary drive.
Create a new instance
- Create a new AWS instance and log into it,
- Make a note of the Instance ID of this new instance,
- In the AWS console find your lost instance, that you cannot log into, by IP address or server name,
- Using the AWS console stop the lost instance,
- Make a note of the Instance ID of the stopped instance.
Detach the root volume from the stopped lost instance
- On the Description tab click the name of the root device
- In the popup click the EBS ID
- Make a note of the volume ID,
- Click the Actions button and select Detach Volume.
Attach the volume to the new instance
- On the same, detached root volume page, click the Actions button and select Attach Volume,
- Search for the new instance by Instance ID and enter a name for the device
- On the Description tab of the new instance, the second drive appears,
Assign a drive letter to the attached drive
- Log into the new instance,
- On the toolbar click the Server Manager icon,
- In the Tools menu select Computer Management,
- On the left side select Disk Management,
- Right-click the second disk and select Online,
- The partitions of the attached volume automatically get the drive letters. The primary partition received the letter E:
- The drives show up in Windows Explorer too.