You can use key pairs to decrypt and connect to the created AWS EC2 instance.
Log on to AWS console.
From the console dashboard, choose Launch instances.
Right-click the AWS server instance you have created and click Connect to instance.
Go to RDP Client → Get Password and launch Get Windows Password.
Click Upload private key file and upload the .pem file.
Once the RSA private key file loads, Click Decrypt Password.
Copy the IP address, username, decrypted password, and the gateway details.