Skip to content

Is geographic restriction possible for API Gateway?

0

I'm aware that CloudFront offers free geographic restriction so that one can prevent selected jurisdictions from being able to download one's CF distribution. But I'm much more concerned about API calls being abused than my content being downloaded. I am confident that API Gateway fully supports such protection, yet I cannot find any documentation of it.

2 Answers
4

You can create your CloudFront distribution with API Gateway as origin, and implement geo-restriction.

More information at How do I set up API Gateway with my own CloudFront distribution?

You can also use AWS WAF to protect API Gateway. Create a custom rule that does geo-restriction, as per How do I use AWS WAF to allow or block requests from a specific country or geolocation?

AWS
EXPERT
answered a year ago
EXPERT
reviewed a year ago
0

Hi,

I'd suggest to use WAF for this: see https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-geo-match.html to block / allow by country or region.

Best,

Didier

EXPERT
answered a year ago
EXPERT
reviewed a year ago

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.