klotho icon indicating copy to clipboard operation
klotho copied to clipboard

Update stage name for REST Gateways to use $default

Open gordon-klotho opened this issue 3 years ago • 3 comments

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-stages.html

You can create a $default stage that is served from the base of your API's URL—for example, https://{api_id}.execute-api.{region}.amazonaws.com/. You use this URL to invoke an API stage.

This would enable customers to use plain CNAME for DNS instead of requiring Custom Domain Mapping and just make it generally easier to interact with.

Backwards-incompatible

This would break existing deployments' custom domain mapping, so we need to be careful about timing and messaging.

gordon-klotho avatar Feb 15 '23 14:02 gordon-klotho

This will require changes to how we wire cloud front as well

atorres-klo avatar Feb 15 '23 17:02 atorres-klo

i dont think the default stage name works with REST apis, the doc linked is purely for http. I wasnt able to figure it out at least and saw

    	* creating API Gateway Stage ($default): BadRequestException: Stage name only allows a-zA-Z0-9_
    	* ```

jhsinger-klotho avatar Apr 05 '23 20:04 jhsinger-klotho

Ahh, yeah, it appears to be a v2 only feature

gordon-klotho avatar Apr 05 '23 20:04 gordon-klotho