Global API Management with API Gateway and Route 53

Part 3 of the multi-region serverless series: putting regional API Gateway endpoints in more than one region and letting Route 53 send each caller to the closest healthy one, with health checks and failover routing for when a region goes dark.

Originally on DEV.toFebruary 18, 2025
Read the full post on DEV.to

Part 3 of the "Going Global with Serverless" series. You've got Lambda deployed in several regions (part 2). Now the API in front of it needs to be global too, otherwise every request still hops back to one region and you've gained nothing. This piece covers regional API Gateway endpoints plus Route 53 doing the traffic decisions.

Three strategies, each with AWS CLI examples. Stand up regional API Gateway endpoints in multiple regions (the example uses us-east-1 and eu-west-1). Configure Route 53 latency-based routing so each caller is sent to the endpoint with the lowest latency to them. Add Route 53 health checks over HTTPS plus failover routing, so when a region's health check starts failing, traffic shifts to a healthy region automatically. The example is a fintech currency-exchange API where low latency actually matters to the product.

Key takeaways

  • Use regional endpoints, not edge-optimized: edge-optimized routes through one region's CloudFront; regional endpoints let Route 53 make a real per-caller choice
  • Latency-based routing and failover routing are separate jobs: one picks the fastest region, the other reacts to an unhealthy one; you want both
  • Health checks trigger failover: tune failure threshold and interval so a real outage flips fast, a blip doesn't; article skips custom domains and per-region ACM certs

Who this is for

Cloud architects and developers building a genuinely global API on serverless AWS, especially where latency is a feature. Assumes comfort with API Gateway and a basic grasp of Route 53 routing policies. Parts 1 and 2 of the series set up what this builds on.

The full walkthrough, with the CLI commands for the endpoints, the Route 53 records, and the health checks, is on DEV.to.

Read the full post on DEV.to