ℹ️ Information: In this section, you’ll learn how to connect to your Windows Server 2025 instance using Remote Desktop Protocol (RDP). This process involves retrieving the administrator password using your key pair and establishing a secure connection.
In the EC2 console:

In the Connect to Instance interface:

In the Get Windows Password interface:

🔒 Security Note: The private key never leaves your computer during this process. The decryption happens locally in your browser.
On your local computer:

In the Windows Security dialog:

When prompted about the identity of the remote computer:

💡 Pro Tip: For production environments, consider setting up proper certificates to avoid these warnings and enhance security.
After successfully connecting:

ℹ️ Information: Sysprep (System Preparation) is a Microsoft tool that prepares a Windows installation for imaging. This is essential when creating custom AMIs to ensure each instance launched from your AMI has unique security identifiers.
On your Windows Server instance:
EC2LaunchSettings
⚠️ Warning: Different Windows Server versions use different EC2 launch agents. Windows Server 2025 uses EC2Launch v2, while older versions may use EC2Launch v1 or EC2Config. Refer to the AWS documentation for version-specific instructions.
When prompted for confirmation:

The Sysprep process will begin:

Your RDP session will end automatically when the instance shuts down
Return to the EC2 console:

🔒 Security Note: Running Sysprep before creating an AMI is a security best practice. It removes unique system information like the Security Identifier (SID), computer name, and driver cache, ensuring each instance launched from your AMI has unique identifiers.
⚠️ Warning: If you don’t run Sysprep before creating an AMI, instances launched from that AMI may have password retrieval issues. You’ll see an error like this:

💡 Pro Tip: While you can reset key pairs through the process described in lab 5.5, using Sysprep is more efficient when you plan to launch multiple instances from your AMI. It allows you to retrieve a new password for each instance without manual intervention.