Is it possible Private EC2 Instance send outbound traffic to Public ELB?

0

Here is the AWS structure I created.

  • VPC : 1
  • Public Subnet : 2 (1 EC2 Instance in each Subnet)
  • Public ELB : 1 (About Public Instance)
  • Private Subnet : 1 (1 EC2 Instance) Here, I want to make a request to the Public ELB from the instance in the Private Subnet. How can I do this? Or did I get the structure wrong?
2 Answers
1

If you're accessing a Public load balancer that is in a different VPC (owned by you or by someone else) then the answer from Jhalak is correct - NAT Gateway is the way to go.

But I think your question is asking how you access the load balancer in the same VPC. You can still use NAT Gateway but there is a charge associated with that. Today, there's no simple way of getting a DNS record for the private IP of the load balancer. Instead, you might create a second private load balancer.

Also: Your question mentions ELB; please consider using ALB as it has many more features.

profile pictureAWS
EXPERT
answered 2 years ago
profile pictureAWS
EXPERT
Toni_S
reviewed 2 years ago
0

you can use NAT Gateway to send traffic out of your Private EC2/subnet.

AWS
answered 2 years 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