Connect to Instance Website on private subnet through EC2 Instance Connect Endpoint with browser.

0

I was wondering how to browse to a website hosted on an EC2 instance on a private subnet through the EC2 Instance Connect Endpoint. Of course the idea is to find an alternative to deploying a Windows bastion host that comes with an edge browser that could connect to the internal private website (think random app admin console on a special port).

I'm familiar with the SSH connection through the endpoint. However, would love the same with HTTP or some ephemeral tunnel/browser tool.

Thanks!

2 Answers
0

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/

profile picture
EXPERT
answered 7 months ago
0

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.

AWS
EXPERT
Mike_L
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions