Search code examples
aws-api-gateway

Is it possible to use wildcards or catch-all paths in AWS API Gateway


I am trying to redirect all traffic for one domain to another. Rather than running a server specifically for this job I was trying to use AWS API Gateway with lambda to perform the redirect.

I have this working ok for the root path "/" but any requests for sub-paths e.g. /a are not handled. Is there a way to define a "catch all" resource or wildcard path handler?


Solution

  • As of last week, API Gateway now supports what they call “Catch-all Path Variables”.

    Full details and a walk-through here: API Gateway Update – New Features Simplify API Development