Connect to Your AWS EC2 Windows Instance Securely with Session Manager


  1. Installing the SSM Agent
  2. Configuring IAM Permissions
  3. Confirm SSM Agent – Active
  4. Connecting via Session Manager
  5. Why Switch to Session Manager?

Tired of managing Bastion Hosts and IP whitelists for RDP connections to your AWS EC2 Windows instances? Streamline access and enhance security with AWS Systems Manager Session Manager.

This guide walks you through configuring Session Manager for secure RDP connections to your Windows EC2 instances.

Installing the SSM Agent

If you’re using a Windows AMI created after 2016, the SSM Agent should already be installed. If not, here’s how to get it set up:

Choose an installation method:

  • PowerShell
  • Direct Download

Follow this official AWS guide for step-by-step instructions: [link to AWS guide on installing SSM Agent]

https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-win.html

Restart your server: This is essential for the agent to take effect.

Configuring IAM Permissions

  1. Go to your IAM console and navigate to the IAM role attached to your EC2 instance.
  1. Attach the permission policy AmazonSSMManagedInstanceCore to the IAM role.

Confirm SSM Agent – Active

Now go to your AWS -> Systems Manager -> Fleet Manager screen and verify whether the EC2 instance is visible

Connecting via Session Manager

  1. Go to your EC2 instance in the AWS Management Console.
  2. Click on “Connect” and then choose “RDP Client”.
  3. Select the option “Connect using Fleet Manager”.
  1. When prompted, use the .pem Key or Username/Password provided by your Administrator (recommended)
  1. Click “Connect” and enjoy a secure remote connection to your Windows desktop!

Why Switch to Session Manager?

  • Forget Bastion Hosts: No more managing IP whitelists for access.
  • IAM-Controlled Access: Secure access for federated users with granular permissions.
  • Detailed Session Logs: Track who connected to your instance and when.

Try using Session Manager for your next EC2 connection and experience the difference in security and convenience!

Please note: This guide provides a general overview. Always refer to the official AWS documentation for the latest configuration details.