- Newest
- Most votes
- Most comments
This error message indicates that your Windows account has been locked due to too many failed login attempts. This is a Windows security feature rather than an AWS-specific issue.
To resolve this issue, you have a few options:
-
Wait for the lockout period to expire (which appears to be about 30 minutes in your case). Windows account lockout policies are designed to automatically reset after a predetermined time.
-
If you're using a non-administrator account that you created on the instance, verify that the user has been granted the right to log on locally.
-
Consider using AWS Systems Manager to troubleshoot RDP issues if they persist. EC2Rescue for Windows Server can also help diagnose and fix common issues that prevent connecting to Windows instances.
To prevent this issue in the future, make sure you're using the correct credentials and consider implementing a more resilient connection method or adjusting the Windows account lockout policy on your instance.
Sources
Troubleshoot issues connecting to your Amazon EC2 Windows instance - Amazon Elastic Compute Cloud
Resolve EC2 connection and startup issues | AWS re:Post
answered 9 months ago
Hi,
This typically happens when the RDP session is closed abruptly—such as closing the RDP window without properly logging off—or when several reconnection attempts are made back-to-back after the session was interrupted.
Windows considers these abrupt disconnects or repeated connection attempts as failed authentication events, and its built-in security policy (Account Lockout Policy) automatically locks the account to protect against brute-force attacks. This is normal Windows behavior, not an AWS-specific issue.
Once the lockout is triggered, the account usually remains locked for a fixed duration—commonly 30 minutes—and during that time you will not be able to log in via RDP, even with the correct password.
Why it happens
- The RDP window was closed without performing a proper Log off.
- Multiple quick reconnection attempts are interpreted as failed logons.
- Windows’ security policy automatically locks the account for a set period.
- In some cases, external bots scanning port 3389 may also trigger failed attempts.
How to fix or avoid the issue
- Adjust Windows Account Lockout Policy On the EC2 instance, you can modify:
- Account lockout threshold
- Account lockout duration
- Reset account lockout counter
Lowering the duration or increasing the threshold reduces the chance of long lockouts.
- Always Log Off properly Instead of closing the RDP window:
- Start → Log off
This ensures Windows closes the session cleanly without counting it as a failed logon.
-
Restrict RDP access via Security Groups Limit port 3389 to your own IP address to prevent bots or scanners from causing lockouts.
-
Use AWS Systems Manager to unlock or repair the instance If the password is lost or the account remains locked, you can run:
- AWSSupport-RunEC2RescueForWindowsTool
This automation can reset the password or repair Windows login issues. Thx,
answered 8 months ago
Relevant content
asked 4 years ago
asked 3 years ago
