How to assign Elastic IP address from a selected list of Elastic Ip addresses to an Auto scaling group

0

I have an application on AWS EC2 instance that is connected to an auto scaling group. One of the third party service providers which we are using is asking us to provide live servers public IP to whitelist to use our application. Now question is that how can I provide a IP list to them because when any new server will create in auto scaling based on load it does not set predefined elastic IP.

So is there any way to Auto set elastic IP to an Auto Scaling group for a new instance created under that Auto Scaling group?

Based on my research I need to create a NAT-Gateway. I have done that but I am not sure of how to add it to the existing Auto Scaling group that we have.

Please what are the steps to follow to attach the NAT-Gateway to the Auto Scaling group?

nelly
已提问 9 个月前299 查看次数
2 回答
2

Assuming your auto scaling group instances are in a private subnet. The private subnet has a route in its route table that routes all internet traffic (0.0.0.0/0) to the NAT Gateway. The NAT Gateway is in a public subnet that has a route table with a route that sends all internet traffic to the Internet Gateway. The NAT Gateway has an Elastic IP. This is the IP address that you provide to the external service. All the traffic from the auto scaling group instances will look like the requests are coming from the NAT Gateway Elastic IP address from the external service point of view.

If you have a multi-AZ architecture for your auto scaling group, you will need a NAT Gateway in each AZ with the private subnet route table pointing to this NAT Gateway. NAT Gateways are highly available within an AZ. You will then need to supply your external service with the Elastic IP assigned to this second NAT Gateway.

profile pictureAWS
专家
kentrad
已回答 9 个月前
profile picture
专家
已审核 9 个月前
profile picture
专家
已审核 9 个月前
profile picture
专家
已审核 9 个月前
0

Thanks for quick answer. I really appreciate.

nelly
已回答 9 个月前

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

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

回答问题的准则