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 réponses
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
répondu il y a 2 ans
profile pictureAWS
EXPERT
Toni_S
vérifié il y a 2 ans
0

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

AWS
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions