2回答
- 新しい順
- 投票が多い順
- コメントが多い順
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.
回答済み 2年前
関連するコンテンツ
- AWS公式更新しました 10ヶ月前
- AWS公式更新しました 10ヶ月前
- AWS公式更新しました 1年前
- AWS公式更新しました 3年前
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