开发者

How does EC2‘s public ip works?

When I launch an EC2 instance,I will get a private ip and public ip.The public ip 开发者_如何转开发can be visited by a dns domain like 'ec2-184-73-237-10.compute-1.amazonaws.com'.When I ping it,I got ip address 184.73.237.10.

My question is: does 184.73.237.10 only belongs to me or it's shared by different instances? If it's shared by different instances,how does it work? As far as I know, each instances(linux) can be accessed by ssh.

Thanks in advance :-)


It only belongs to you (there is a 1:1 mapping between public and private IP addresses), but it can change at any time. For this reason, if you need an instance to be permanently accessible by IP they recommend using an Elastic IP Address. EIP is free as long as it's actually associated with an instance.


It is recommended to create and associate an Elastic IP (AWS's static IP) to your instance. And this IP will be only yours.

The benefit of Elastic IP, is that, even you can associate it to other instance, restored server from the AMI image of parent instance, thus bring back your site in case of any issues/attacks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜