← Back to list

How I Connected to My EC2 Windows Instance Using AWS Session Manager — Without Opening RDP

Today, I successfully connected to a Windows EC2 instance without using RDP or SSH — all thanks to AWS Systems Manager Session Manager…

Giathidaniel in AWS in Plain English · 2025-07-09 18:26 · 0 claps · 1.4 min read
#ec2-instance #cloud-security #aws #cloud-computing #connection
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

How I Connected to My EC2 Windows Instance Using AWS Session Manager — Without Opening RDP

Today, I successfully connected to a Windows EC2 instance without using RDP or SSH — all thanks to AWS Systems Manager Session Manager (SSM). Here’s how I did it step-by-step, including setup, troubleshooting, and the moment it finally worked.

Why Use Session Manager?

  • No need to open port 3389 (RDP) or use SSH keys
  • Secure and auditable via AWS CloudTrail/CloudWatch
  • Works even in private subnets

Step-by-Step Setup

1. Launched an EC2 Instance

  • AMI: Windows Server 2019
  • Instance Type: t3.micro
  • Region: eu-north-1
  • Attached a key pair: Demo Key (for fallback RDP if needed)

2. Created IAM Role

I created a role with this policy:

AmazonSSMManagedInstanceCore

Then I attached it to the running instance via EC2 > Actions > Security > Modify IAM Role.

3. Verified Networking

  • The instance had a public IP
  • Security group had outbound access to port 443 (HTTPS)
  • Inbound port 3389 was open for fallback RDP

4. Started the SSM Agent (Windows)

I connected via RDP using the key pair, then ran this in PowerShell:

Start-Service AmazonSSMAgent

5. Connected via Session Manager

Once the agent was running and IAM role in place, I went to:

EC2 > Instances > Connect > Session Manager

And boom — I was in!

Test Commands I Ran:

systeminfo | Select-String "^OS"
Get-Service AmazonSSMAgent
Invoke-WebRequest https://www.google.com
whoami

Results

Connected securely via AWS Session Manager — no RDP, no SSH, and no exposed ports. Clean, secure, and auditable.

Conclusion

SSM is a must-use tool for secure AWS access — especially in enterprise environments or boot camps where minimizing exposure matters.

Before you go

  • Please take a moment to like the post and follow the writer!
  • Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute here

메타데이터
post_id
2c8567f623a7
slug
how-i-connected-to-my-ec2-windows-instance-using-aws-session-manager-without-opening-rdp-2c8567f623a7
url
https://aws.plainenglish.io/how-i-connected-to-my-ec2-windows-instance-using-aws-session-manager-without-opening-rdp-2c8567f623a7
canonical_url
https://aws.plainenglish.io/how-i-connected-to-my-ec2-windows-instance-using-aws-session-manager-without-opening-rdp-2c8567f623a7
author_url
https://medium.com/@giathidaniel252
status
ok
fetched_at
2026-07-14 12:43:20