具有出站静态 IP 的 AWS Fargate

AWS Fargate with outbound static IP

我有一项任务是 Fargate 服务。通过这个任务,我必须与其他公司管理的 SFTP 服务器进行交互,他们需要将我的 IP 列入白名单。

我已经将 NLB 设置为具有静态入站 IP,并且运行良好,但现在我也需要将出站 IP 设置为静态。

我读过类似的问题,他们建议使用 NAT 网关,但目前还没有奏效。

我已经创建了 NAT 网关,将它与弹性 IP 和托管服务的子网相关联,但它不工作,出站 IP 仍然是动态分配的。

我还缺少哪些额外的步骤?

I have created the NAT gateway, associated it with an Elastic IP and the subnet which hosts the service

NAT 网关需要位于 public 子网(附加了 Internet 网关的子网)中。

服务需要在私有子网中(没有 Internet 网关的子网,以及到 NAT 网关的路由)。

该服务需要将“分配 Public IP”设置为 false