aws-api-gateway

AWS API Gateway - Remove Stage Name From URI


The stage name is added to the url when I deploy the API. Let's say the stage name is "test", then the generated URL for the resource includes the stage name. Something like: https://abcabc.execute-api.us-east-1.amazonaws.com/test/my/path

I would like to remove the stage name in the URL. How can I do it?


Solution

  • You can do this with API Gateway Custom Domains. This allows you to optionally omit the stage name in the custom domain name mapping by setting path to *.