具有 One-Zone EFS 和互联网访问的 AWS Lambda 函数
AWS Lambda function with One-Zone EFS and internet access
我的 Lambda 功能一直运行良好,直到昨晚突然无法访问互联网。
它已连接到 VPC 以访问我的 One-Zone EFS。
A 发现要在连接到 VPC 时让 Lambda 函数连接到互联网,我需要设置一个子网以访问设置为 NAT 网关的路由 Table。
到目前为止一切顺利。
现在,当我尝试将其他 (NAT) 子网添加到我的 Lambda 函数时,它告诉我
EFS file system referenced by access point does not have mount targets created in all availability zones the function will execute in. Please create EFS mount targets in availability zones where the function has a corresponding subnet provided.
所以我也尝试将 EFS 添加到新子网(尽管这对我来说没有意义,因为我只想将其用于互联网访问)。
现在真糟糕 - 在尝试为新子网添加另一个挂载目标时,EFS 告诉我 You can only create one mount target per Availability Zone.
。
我是否必须为 EFS 禁用 One-Zone 才能让我的微型 Lambda 函数再次连接到互联网?
阅读 Mark 的回答 () 后,我删除了最初为 EFS 添加的子网,只保留启用 Internet 访问(现在也连接到 EFS)的子网。现在我不明白我创建另一个路由 table 的目的是什么,因为如果我理解正确,一个子网只能使用一个路由 table 并且据我所知,当前配置不使用路由对于 EFS,但出于某种原因它仍然可以访问它。
无论如何,我不会再碰任何东西了,很高兴现在是 运行。
EFS file system referenced by access point does not have mount
targets created in all availability zones the function will execute
in.
这意味着您需要修改 Lambda 函数,使其配置为 运行 的唯一 VPC 子网与 EFS 挂载目标位于同一可用区。听起来您目前已在多个 subnet/availability 区域中将其配置为 运行。
我的 Lambda 功能一直运行良好,直到昨晚突然无法访问互联网。
它已连接到 VPC 以访问我的 One-Zone EFS。
A 发现要在连接到 VPC 时让 Lambda 函数连接到互联网,我需要设置一个子网以访问设置为 NAT 网关的路由 Table。
到目前为止一切顺利。
现在,当我尝试将其他 (NAT) 子网添加到我的 Lambda 函数时,它告诉我
EFS file system referenced by access point does not have mount targets created in all availability zones the function will execute in. Please create EFS mount targets in availability zones where the function has a corresponding subnet provided.
所以我也尝试将 EFS 添加到新子网(尽管这对我来说没有意义,因为我只想将其用于互联网访问)。
现在真糟糕 - 在尝试为新子网添加另一个挂载目标时,EFS 告诉我 You can only create one mount target per Availability Zone.
。
我是否必须为 EFS 禁用 One-Zone 才能让我的微型 Lambda 函数再次连接到互联网?
阅读 Mark 的回答 (
无论如何,我不会再碰任何东西了,很高兴现在是 运行。
EFS file system referenced by access point does not have mount targets created in all availability zones the function will execute in.
这意味着您需要修改 Lambda 函数,使其配置为 运行 的唯一 VPC 子网与 EFS 挂载目标位于同一可用区。听起来您目前已在多个 subnet/availability 区域中将其配置为 运行。