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 Answer
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
EXPERT
answered 20 days ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions