- Newest
- Most votes
- Most comments
Hello.
Attempting to port forward using the EC2 Instance Connect endpoint fails with the following error:
awscli.customizations.ec2instanceconnect.websocket - ERROR - {"ErrorCode":"InvalidParameter","Message":"The specified RemotePort is not valid. Specify either 22 or 3389 as the RemotePort and retry your request."}
From the content of the error, only SSH and RDP are allowed, so you cannot access the private website via the EC2 Instance Connect endpoint.
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/connect-using-eice.html
Only ports 22 and 3389 are supported.
It is possible to open a private website by port forwarding using Session Manager as shown in the document below.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/
alternative to deploying a Windows bastion host that comes with an edge browser that could connect to the internal private website
Depending on your use case, Workspaces Web may be a good alternative. It provides browser access to internal websites / EC2 web server. Or you can setup Amazon AppStream 2.0 to stream web browser application.
Relevant content
- asked 3 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- I host a website on an EC2 instance. How do I allow my users to connect on HTTP (80) or HTTPS (443)?AWS OFFICIALUpdated 2 years ago