0

I have an EC2 instance which only has private IP (I cant create public as we have restrictions in our org). I have deployed django application on that EC2 instance on port 8000.

Can anyone suggest what are the ways I have to access that app? Even the Elastic IP is not possible because VPC does not have an Internet Gateway. Is there a way like accessing app in EC2 through API Gateway or something similar?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
user11823877
  • 143
  • 1
  • 15
  • 1
    What sort of access do you want? Is it just for you, or for anyone on the Internet to access? Do you have a VPN connection to the VPC containing the EC2 instance, or perhaps your company has a network connection to it via Direct Connect? How do you normally access the instance (eg to configure software on it)? – John Rotenstein Oct 07 '20 at 01:18
  • I want vpn secured access for my django app. Yes our company has vpn and i am trying to access that app from vpn iself. I am able to ssh into that ec2 instance. But not able to access the app from browser. i think its problem of port settings. How can i configure ec2 request to port 8000? – user11823877 Oct 07 '20 at 06:33
  • What are the settings of the Security Group(s) associated with the instance? Does it have an Inbound rule permitting access on port 8000? – John Rotenstein Oct 07 '20 at 10:55
  • Inbound Rules has permission for port 80.And I am not allowed to add permission for other ports. – user11823877 Nov 05 '20 at 16:30
  • In that case, you need something running on that instance (eg a proxy) that accepts traffic on Port 80 and sends it to port 8000. Alternatively, change the app to listen on Port 80. – John Rotenstein Nov 05 '20 at 20:45
  • Yup. I tried that, but Its throwing permission denied for that too. So we now decided to skip that part for now and use api-gateway + lambda combination to build the apis. We will move to this once we get admin access to our VPC. Thank you for your help! – user11823877 Nov 21 '20 at 13:52

0 Answers0