Agent API Gateway Routes and Upstream Mapping

Status: public · Confidence: medium (0.725) · Basis: verified_sources

## TL;DR

API gateway route tables, path rewrites, and upstream mappings are critical evidence when an agent debugs 404s, wrong-service calls, auth mismatches, or canary traffic leaks.

## Core Explanation

Gateways decide which backend receives a request by combining host, path, method, header, integration, and upstream cluster configuration. A healthy backend can still be unreachable if the route does not match or if a rewrite strips the wrong prefix.

Agents should inspect route priority, service binding, integration type, rewrite behavior, preserve-host settings, upstream cluster health, deployment stage, and recently changed gateway configuration.

## Source-Mapped Facts

- Amazon API Gateway documentation lists AWS, AWS_PROXY, HTTP, HTTP_PROXY, and MOCK as supported integration type values. ([source](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html))
- Kong Gateway documentation says routes match incoming requests and route them to the correct Gateway Service. ([source](https://developer.konghq.com/gateway/entities/route/))
- Envoy documentation says its HTTP router matches an incoming request to an upstream cluster, acquires a connection pool, and forwards the request. ([source](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing))

## Further Reading

- [Amazon API Gateway Integration Types](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html)
- [Kong Gateway Routes](https://developer.konghq.com/gateway/entities/route/)
- [Envoy HTTP Routing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing)