gpt4 book ai didi

amazon-web-services - 只允许 AWS API Gateway 访问 EC2 实例

转载 作者:行者123 更新时间:2023-12-04 08:02:12 24 4
gpt4 key购买 nike

我们的 API 在 AWS EC2 实例上运行。我们对使用 Cognito 和版本控制对 API 调用进行身份验证的 AWS API Gateway 感兴趣。

谁能告诉我如何在不公开的情况下允许访问托管在 EC2 实例上的 API?我只希望 API 网关访问该 API。

我无法在文档中找到任何解决方案。

最佳答案

上一个答案:

您的服务器必须是公开的,API 网关才能访问它。此时最好的解决方案是使用客户端 SSL 证书,这样您的服务器就可以轻松拒绝任何不是来自 API 网关的流量。

http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html

更新的答案:

您现在可以在您的 VPC 中放置一个不可公开访问的私有(private)网络负载均衡器,并启用 VPCLink在 API 网关中允许 API 网关向私有(private) NLB 发送请求。

关于amazon-web-services - 只允许 AWS API Gateway 访问 EC2 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36386947/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com