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!

已提問 7 個月前檢視次數 401 次
2 個答案
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
專家
已回答 7 個月前
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
專家
Mike_L
已回答 7 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南