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 年前446 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则