Accidentally i disabled RDP on EC2 windows machine and now I am not able to access it via RDP, Is there any way to re-enable RDP service on EC2 instance?

  • how did you disable RDP? using which way? from windows setting ? Feb 7, 2019 at 6:49
  • It might help you troubleshoot-remote-desktop-connection-ec2-windows Feb 7, 2019 at 6:56
  • 1
    I was trying to run powershell script, Accidentally script did that.
    – Jay
    Feb 7, 2019 at 7:05
  • A link by itself is not an answer. Links can rot. Please, at least summarise what's behind the link for your answer to have lasting value to this site.
    – Mast
    Feb 7, 2019 at 12:17

1 Answer 1


Yes, You can able to re-enable RDP using run the AWSSupport-ExecuteEC2Rescue Automation (AWS Systems Manager)

Please follow below steps carefully:

  1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/.

  2. In the navigation pane, choose Automation.

  3. Choose Execute automation.

  4. In the documents list, choose AWSSupport-ExecuteEC2Rescue. The document owner is Amazon.

  5. In the Document details section verify that Document version is set to the highest default version. For example, 13 (default).

  6. In the Execution mode section, choose Simple execution. Leave the Targets and Rate Control option disabled.

  7. In the Input parameters section, specify the following parameters:

    For UnreachableInstanceId, specify the ID of the unreachable instance.

    For LogDestination, specify an Amazon S3 bucket if you want to collect operating system-level logs while troubleshooting your instance. Logs are automatically uploaded to the specified bucket.

    For EC2RescueInstanceType, specify an instance type for the EC2Rescue instance. The default instance type is t2.small.(Please leave as it is if you are confused and go ahead)

    For SubnetId, specify a subnet in an existing VPC in the same availability zone as the unreachable instance. By default, Systems Manager creates a new VPC, but you can specify a subnet in an existing VPC if you want. (Please leave as it is if you are confused and go ahead)


If you don't see the option to specify a bucket or a subnet ID, verify that you are using the latest Default version of the document.

For AssumeRole, if you created roles for this Automation by using the CloudFormation procedure described earlier in this topic, then specify the AssumeRole ARN that you copied from the CloudFormation console.

  1. Choose Execute automation.

It takes sometimes (5-10 minutes) and you are able to access your old instance with new IP.

Here is the AWS documentation for this issue: https://aws.amazon.com/premiumsupport/knowledge-center/troubleshoot-remote-desktop-connection-ec2-windows/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.