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
asked 9 months ago286 views
2 Answers
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
EXPERT
kentrad
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
profile picture
EXPERT
reviewed 9 months ago
profile picture
EXPERT
reviewed 9 months ago
0

Thanks for quick answer. I really appreciate.

nelly
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions