Rahul Bobhate
Rahul Bobhate

Reputation: 5092

Routing to API gateway using AWS Route 53

I have a lambda function in all AWS regions. I have clients throughout the globe who will make a POST call to my base domain example.com. It is the responsibility of my (kind-of) load-balancer to make sure that the requests are routed to the API gateway of the region which is closest to the client, in order to minimize the latency.

So, far I have the following configuration:

After these configurations, when I make a call to example.com, I receive a 403 response from Cloudfront, calling it a Bad Request

Thanks

Upvotes: 1

Views: 7505

Answers (1)

slimdrive
slimdrive

Reputation: 211

As of Nov 2017 "Amazon API Gateway Supports Regional API Endpoints"

https://aws.amazon.com/about-aws/whats-new/2017/11/amazon-api-gateway-supports-regional-api-endpoints/

You can now choose from two types of API endpoints when creating REST APIs and custom domains with Amazon API Gateway. A regional API endpoint is a new type of endpoint that is accessed from the same AWS region in which your REST API is deployed. This helps you reduce request latency when API requests originate from the same region as your REST API. Additionally, you can now choose to associate your own Amazon CloudFront distribution with the regional API endpoint. The second type of API endpoint is the edge-optimized API. Edge-optimized APIs are endpoints that are accessed through a CloudFront distribution that is created and managed by API Gateway. Previously, edge-optimized APIs were the default option for creating APIs with API Gateway.

To get started, create a new REST API using the Amazon API Gateway console, AWS CLI, or AWS SDKs and APIs. You can also migrate existing REST APIs and custom domains to a regional API endpoint. Visit our documentation to learn more about this feature.

This feature is now available in US East (N. Virginia), US East (Ohio), US West (Oregon), US West (N. California), Canada (Central), South America (São Paulo), EU (Ireland), EU (Frankfurt), EU (London), Asia Pacific (Singapore), Asia Pacific (Tokyo), Asia Pacific (Sydney), Asia Pacific (Seoul), and Asia Pacific (Mumbai) AWS regions. Visit our product page for more information about Amazon API Gateway.

Upvotes: 1

Related Questions