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개 답변
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
전문가
답변함 2년 전
profile pictureAWS
전문가
Toni_S
검토됨 2년 전
0

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

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠