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
demandé il y a 9 mois299 vues
2 réponses
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
répondu il y a 9 mois
profile picture
EXPERT
vérifié il y a 9 mois
profile picture
EXPERT
vérifié il y a 9 mois
profile picture
EXPERT
vérifié il y a 9 mois
0

Thanks for quick answer. I really appreciate.

nelly
répondu il y a 9 mois

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