Connecting the API Gateway to a private VPC

0

Hello, everybody. I am new to AWS, maybe this question is trivial, but I will be glad of any help. The question is, is it possible to connect the REST API Gateway endpoint to a private network without using a load balancer? I will describe the structure in more detail. So, I used Elastic Beanstalk in order to deploy the application using Tomcat. When setting up the environment, I chose a default VPC and, at the level of the security group created for the EC2 server, limited HTTP traffic only to use the IP subnet from the VPC. After that, I made a new REST endpoint, in which I specified the Beanstalk provided DNS as the destination point. However, without additional settings, requests do not reach the server, as they are blocked by the security group. I read about VPC links in the AP Gateway I and, as far as I understand, the basic solution would be to make such a link and make requests through it, however, from the documentation and UI, I can only make the link that would point to the Network Load Balancer. The problem is that at the current stage of the project, the load balancer seems superfluous to me. I have only one server and would not like to connect additional balancing resources for one server. I'm wondering if I can make a new VPC endpoint myself through the VPC console and use it for queries, or maybe there is better method to implement this. All this is necessary for a simple requirement: all requests to the server should be possible only through the API Gateway endpoint, I want to remove the ability to initiate HTTP requests to the server through the provided public domains (EC2 domain, Beanstal domain). For this purpose, I have placed Beanstalk resources on a private network, but I cannot find a solution to connect Beanstalk and API Gateway.

1개 답변
0
수락된 답변

The load balancer is required if you are going to use API Gateway to access your private VPC.

Although it's a little more effort, how about using API Gateway to trigger a Lambda function that is linked to your VPC? Then have that Lambda function make the call to your privately hosted server.

profile pictureAWS
전문가
답변함 5달 전
profile picture
전문가
검토됨 5달 전
  • Thank you very much for the response. I will try this solution.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠