AWS Instances on Windows Recovered with Platform Property Set to Linux

Product version: 10.7

Last modified: 5 March 2024

Problem

The AWS Windows instance recovery job finishes successfully but the "Platform" property on the recovered AWS instance on Windows is erroneously identified as “Linux/UNIX”. Sometimes, the default user can also get an error message stating that

EC2 can't retrieve the platform because the AMI was either deleted or made private.

As a result, the RDP client tab misses from the Connect screen of the AWS EC2 Console for the recovered instance which prevents the user from accessing the local admin password set for the instance.

Background

Every Amazon EC2 Windows instance launches with a default system user account with administrative access to the instance.

If the "Platform" and "Platform Details" of the Windows instance are indicated correctly in the AWS EC2 console, the RDP client option tab is shown when using the Connect feature that allows you to decrypt the local admin password for the instance.

Solution

To resolve the issue with the "Platform" property set to "Linux/UNIX "platform, proceed as follows:

  1. Launch a new instance from a Public Amazon AMI from EC2 console. Ensure to select an AMI that meets your use case - https://console.aws.amazon.com/ec2/.

  2. Once the instance has successfully launched, stop the instance and take a note of the volume ID attached to the newly launched instance.

  3. Stop the affected instance. Take a note of the volume ID(s) for the affected instance.

  4. Detach the root volume from the newly launched instance and then detach the volume(s) from the affected instance. Full steps on how to detach an Amazon EBS volume from a Windows instance can be found referenced below [1].

  5. Attach the affected instances volume (noted previously) to the newly launched instance as the root volume ( /dev/sda1, etc). This can be achieved by following the steps referenced below [2].

  6. Start the newly launched instance. The instance should now be correctly listed as Windows with the volume attached. Please note it is recommended to take a snapshot of the volume [3] before making any changes for the unlikely event of disaster recovery.

    Notes

    • When creating an Amazon Machine Image (AMI) to be used in a different region it is important that you create the AMI in the source region. In this case, you can follow the steps in the documentation referenced below [4] to copy an AMI from one AWS region to another.

    • Make sure to select the correct destination region and follow the links referenced below [5] to see how to copy a snapshot to a new region.

    References

    [1] Detaching an Amazon EBS volume from a Windows instance: https://docs.amazonaws.cn/en_us/AWSEC2/latest/WindowsGuide/ebs-detaching-volume.html

    [2] Attaching an Amazon EBS volume to an instance: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-attaching-volume.html

    [3] Creating an EBS snapshot: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html

    [4] Copying an Amazon Machine Image (AMI) from one AWS region to another: https://aws.amazon.com/premiumsupport/knowledge-center/copy-ami-region/

    [5] Copying snapshots: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html