在子网内为 Fargate 使用固定私有 IP 范围

Use Fixed Private IP Range for Fargate within Subnet

我想使用 AWS ECS fargate,但安全团队要求我限制子网内我的 fargate 实例的私有 IP 范围。

来自 AWS networking docs,似乎可以使用单独的非托管 ENI 来指定私有 IP 地址。有没有一种方法可以为 Fargate 实例使用静态 IP 范围?

For tasks that use the Fargate launch type, the task ENI that is created is fully managed by AWS Fargate. Depending on which Fargate platform version your task uses, the network traffic for your task may also use a separate Fargate-owned ENI.

固定的私有 IP 范围取决于您将 Fargate 任务部署到的子网。

如果您为 Fargate 任务创建单独的子网,然后确保只有 Fargate 任务在这些子网中启动,您就可以向您的安全团队提供此范围。

Fargate 在启动任务时创建 ENI,随机私有 IP 地址来自子网范围内的可用 IP 池。