2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
You could use a Proxy or NAT-Gateway in front of the EC2 fleet that way regardless of the ASG activity externally NAT-Gateway EIP will be seen as the source IP.
0
An EIP (or any public IP) can only be assigned to a single instance/ENI, you can't assign it to multiple instances as you scale. AutoScaling only supports a static EIP when the group has a max of 1 instance (in which case that EIP/ENI can be reused on replacement instance, but the group can't scale above 1 instance). What is your goal here?
A static inbound IP?
- Use a Network Load Balancer (NLB) and attach its target group to the ASG. NLB IPs are static and never change with 1 EIP per AZ
Static outbound IP?
- Use a NAT Gateway
Both?
- You'll need to create a pool of unused EIPs, and then create a userdata script in the Launch Template for your AutoScaling Group. The script will need to search for available EIPs and attach one to the instance
Note that all 3 of the above options have varying levels of cost associated with them.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un mois
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 10 mois
Thank you for responding, Could you please share any reference links where I can get help from it?
If you're using private subnets, you can allow the Auto Scaling instances to access the internet by using a public NAT gateway. https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html