skip to Main Content

On AWS, I have VPC containing public and private subnet. Internet Gateway and Routing Tables are configured. I have configured Windows AWS EC2 instance in private subnet. Necessary IAM role, System Manager and Session Manager is configured and working. Security group allows HTTPS requests from anywhere to port 443. I have hosted website in IIS on port 443.
I want to access this website from any public IP through Public IPv4 DNS assigned by AWS. With above setup its not working.

2

Answers


  1. Your EC2 instance is in a private network which means that it is not accessible from the Internet. This is the explicit purpose of using a private subnet.

    Your options are:

    • Put the EC2 instance in a public subnet, or
    • Put a Load Balancer in a public subnet (charges apply) and configure it to forward HTTP/S requests to the EC2 instance in the private subnet
    Login or Signup to reply.
  2. You can add a secondary network interface to the instance. Put the primary ENI in the public subnet and the second ENI in the private subnet. Assign appropriate values in the respective security groups.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search