超时从另一个AWS账户调用PRIVATE API Gateway [英] Timeout calling PRIVATE API Gateway from another AWS account

查看:99
本文介绍了超时从另一个AWS账户调用PRIVATE API Gateway的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从另一个AWS账户中的lambda函数调用我的私有API网关.但是我在拨打电话时超时(实际上,http通话只是卡住了,并导致我的客户端超时).

I am trying to call my private API gateway from a lambda function in another AWS account. But i am getting timeout while making the call (Actually the http call is just stuck and hits my client side timeout).

在托管私有AWS账户的AWS账户中,我执行了以下操作*在API的后面创建了我的私有API网关和lambda

In the AWS account which hosts the private AWS account i did the following * Created my private API gateway and lambda behind the API

  • 创建资源策略并提供对另一个AWS调用方(调用方)的VPC端点的访问权限
  • 创建启用了专用DNS的VPC端点.
  • 将策略附加到具有完全访问权限的VPC终结点,并具有可以访问所有流量的安全组.

在第二个AWS账户(呼叫者)中,我执行了以下操作*为具有完全访问权限的API网关创建VPC和VPC端点.

In the second AWS account (caller) i did the following * Create VPC and VPC endpoint for API gateway with full access.

  • 在具有安全组的VPC中创建lambda,并可以访问所有流量(入站和出站)
  • 在lambda中,我正在使用VPC端点(帐户1)的公共DNS,并使用标头'x-apigw-api-id'

我已经尝试了本页中提到的调试步骤

I already tried the debugging steps mentioned in this page https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-private-endpoint-connection/. Also tried whitelisting based on the VPC ID instead of VPC endpoint ID.

任何解决此问题的建议.

Any suggestions for resolving this issue.

推荐答案

刚刚发现了问题.我在拨打电话时正在使用其他AWS帐户的VPC端点.当我使用同一帐户的VPC端点时,它可以正常工作.

Just found the isssue. I was using the VPC endpoint of the other aws account while making a call. When i used the VPC endpoint of the same account it worked.

这篇关于超时从另一个AWS账户调用PRIVATE API Gateway的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆