使用本地 IP 而不是弹性 IP 访问 EC2 机器

Access EC2 machine with local IP instead of elastic IP

我有一个一直用于生产的 Amazon EC2 实例,但由于某些奇怪的原因我没有使用弹性 IP。

既然我想使用弹性 IP,AWS 似乎不允许连接到旧 IP。在我的用例中,我需要可以通过两个 IP 访问该实例。这真的可能吗?

没有。关联弹性 IP 后,您将无法使用旧的 public IP。请记住,您只有一个网络接口,不能有 2 个 public(可路由的)IP 与之关联。

来自Elastic IP Address Basics

If you associate an Elastic IP address with the eth0 network interface of your instance, its current public IP address (if it had one) is released to the EC2-VPC public IP address pool. If you disassociate the Elastic IP address, the eth0 network interface is automatically assigned a new public IP address within a few minutes. This doesn't apply if you've attached a second network interface to your instance.