Auto assign public IPs to my instance created by an austo-scaling group

血红的双手。 提交于 2019-12-11 15:06:56

问题


I have an Auto-Scaling group (min. 1 instance and max. 5) with my website running there. This first instance public IP is pointing to my domain "example.com" But when the auto-scaling group create another instance (due the load incrementation) with another public IP, if I try to access to the new instance, this IP doesn't resolve to my domain "example.com" till I include this new public IP into my host filename or into my dns manager (godaddy).

How could I solve this and automatise this process?

Thanks in advance Kind Regards KV


回答1:


You need to place an AWS load balancer in front of your EC2 instances. Attach the auto-scaling group to the load balancer so that instances are automatically added to the load balancer's pool when they are created, and automatically removed from the pool when they are terminated. Point your domain name to the load balancer instead of individual instances.



来源:https://stackoverflow.com/questions/47096346/auto-assign-public-ips-to-my-instance-created-by-an-austo-scaling-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!