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 Antworten
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
EXPERTE
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
Toni_S
überprüft vor 2 Jahren
0

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

AWS
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen