0

I have two EC2 instances. Which are running on the same VPC with private subnet(NAT attached). Each Instances, I am running different services which are running on the port 7060(APP1) and 8090(APP2).

If I am making the requests to APP2 from APP1. It is going via APP1 --> NAT --> IGW --> ELB --> APP2.

Using the VPC endpoint can I send a requests like APP1 --> VPC endpoint --> APP2?

If it is possible using the VPC endpoint/other AWS services, please suggest/correct me if I am wrong..

Thank you.

I created the VPC endpoint(Interface endpoint) for the EC2 services and I allowed the ports in the endpoint's security group. When I try to send a requests via VPC endpoint, it is not connecting to the APP2 :-(

  • 3
    Is there a reason you want this traffic to exit and then re-enter the VPC? Both instances are in the same VPC so they can communicate directly, without going out of the VPC through NAT, from private IP to private IP or via [internal Classic ELB](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-internal-load-balancers.html) as long as the correct security groups are set up. – jarmod Jun 25 '23 at 17:27
  • 1
    Why are you using an Elastic Load Balancer? Are both instances serving on both ports? If so, why not simply snd the request to the other port on the _same_ instance? – John Rotenstein Jun 25 '23 at 21:53

0 Answers0