I am curious how to invoke a VCP endpoint using https://{rest-api-id}-{vpce-id}.execute-api.{region}.amazonaws.com/{stage}

0

I am making an rest API in Account A with the goal of calling an private API in account B. I have followed the steps in https://repost.aws/knowledge-center/api-gateway-private-cross-account-vpce, but using this, I would have to spin up an EC2 instance and use vpc endpoint in a curl statement. How can I use api gateway in Account A to invoke the VPC endpoint. I have seen VPC link integration, but am confused if I need to create a REST VPC Link and a Network Load Balancer (NLB), or if there are any other work arounds

Notes:

  • Account A has VPC, VPC endpoint setup to execute api
  • Account B has the private rest api setup
  • Account B api has resource policy to allow interface endpoint to invoke the private API

Originally, I was trying to invoke the VCP endpoint through http, but this endpoint is not available over the internet. What would steps look like to use the VPC link integration?

1 回答
0

To invoke a VPC endpoint using the format you requested, you need to set up API Gateway with a VPC Link integration in the stage of your API. Remember to ensure that your VPC endpoint is correctly configured to receive traffic from API Gateway and that the necessary security groups, route tables, and IAM permissions are set up to allow communication between API Gateway and your VPC resources.

profile picture
专家
已回答 1 个月前
  • Is it possible to create a VPC link without creating a Network Load Balancer? Looking to use this VPC link to invoke the VPC endpoint without either a NLB for rest api vpc link?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则