简体   繁体   中英

Timeout calling PRIVATE API Gateway from another AWS account

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).

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

  • Create resource policy and provided access to the VPC endpoint of the other AWS caller (caller)
  • create VPC endpoint with private DNS enabled.
  • Attached policy to VPC endpoint with full access, security group with access to all traffic.

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

  • created lambda in the VPC with security group with access to all traffic (inbound and outbound)
  • In lambda I am using the public DNS of the VPC endpoint(Account 1) and used header '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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM