API Gateway set stage variable based on source IP Address

0

Would like to route API Gateway invocation based on source IP Address. Eg. is source IP 10.x.x.x then invoke function A, if source IP 11.y.y.y then invoke function B. Similar with what Route53 supports for routing based on IP Address but we don't have access to Route53. Thank you in advance, Lucian

2回答
2

API Gateway does not support content based routing. One option might be to invoke a Lambda function that will invoke the appropriate backend.

profile pictureAWS
エキスパート
Uri
回答済み 1年前
profile picture
エキスパート
iwasa
レビュー済み 1年前
1

A potential design could be that you create an API Gateway backed by a Step Function. (https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html).

Then you could pass the IP or get it as part of header/payload (encrypted if you wish), passit to a Choice step that based on that decides which Step/Lambda function to call.

profile picture
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ