我正在尝试在现有 VPC 中设置 VPC 端点。 我能够从 VPC 内的 lambda 调用私有(private)网关端点。
问题: 当我尝试调用区域 API 网关端点时,出现 403。 Nat 网关已设置。我可以通过 NAT 网关访问互联网。
我需要从 VPC 中的 lambda 调用私有(private)端点和区域端点
最佳答案
您的 VPC 端点隐藏了您的公共(public) API 端点。来自 docs :
you cannot access public APIs from a VPC by using an API Gateway VPC endpoint with private DNS enabled
因此,您可以禁用 private DNS对于 VPC 端点。这样,您将必须在您的 lambda 中显式使用私有(private) VPC 端点 URL。
访问公共(public) API 的替代方法是 through :
Note that these DNS settings don't affect the ability to call these public APIs from the VPC if you're using an edge-optimized custom domain name to access the public API
关于amazon-web-services - 如果创建了 VPC 端点,则无法访问公共(public) AWS API 网关端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69907357/