AWS弹性IP网络vpc未连接到任何Internet网关

ric*_*oon 14 amazon-ec2 amazon-web-services elastic-ip

我已经限制访问AWS账户.

我已经创建了一个EC2实例但是当我尝试关联一个弹性ip时,我得到了以下错误:

An error occurred while attempting to associate the address
Network vpc-(security id) is not attached to any internet gateway
Run Code Online (Sandbox Code Playgroud)

Ant*_*ala 21

您正在使用新的Amazon Virtual Private Cloud而不是EC2 Classic.您正在使用的云缺少可从公共互联网访问云所必需的互联网网关虚拟组件.

您需要将Internet网关添加到您的私有云,以便能够连接到Internet; 有了它,您可以使用弹性IP(毕竟,它们是可以访问Internet的;您的VPC实例可以具有静态实例IP),并为Internet地址(0.0.0.0/0或更窄的空间)添加路由条目.


Pat*_*tty 5

出现此错误是因为 VPC 未与 Internet 网关关联。要解决此问题:转到 VPC,然后单击 Internet 网关。如果不存在,则创建一个(可能需要管理员权限),然后将其附加到目标 VPC-id。并再次尝试将弹性 IP 地址与 EC2 实例相关联。希望能帮助到你 :)