Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
352 views
in Technique[技术] by (71.8m points)

amazon web services - How can I route api gateway endpoint to ec2 private IP

I have deployed django app on ec2.I am only allowed to use private IP for ec2. So my endpoint is only accessible in our vpn. Now there is requirement like some of external applications want to use some of backend endpoints of that django application. So we want to have open endpoint secured with mechanism like apikey. Is there any way to do this? I am thinking like creating api endpoint which will route to the ec2 enpoint. But Not sure how we can allow apigateway to access that endpoint.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can achieve that through API Gateway private integrations. This will require you to setup VpcLink between your API and VPC, as well as Network Load Balancer (NLB) which the API connects to. The NLB then will connect to your private EC2 instance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...