Linking service to custom API Gateway domain

Recently I had an issue where the deployment of my service died for some reason, and then when it tried to rollback, it got into a bad state and was both unable to be deleted, and unable to be re-deployed. Eventually I was able to manually delete the service.

However, this introduced a new problem in my software stack: the API-Gateway URL that i’d be using has a auto-generated GUID in the path, and that GUID changed with the new deployment.

It occurred to me that I’d be better off pointing that API to a custom domain, but i’d like that domain to get connected to the API endpoint automatically via CloudFormation.

Is it possible to add anything to Serverless.yaml that would setup a custom domain for my api gateway url?

This plugin should do the trick for you :wink:


brilliant. I’ll give this a try. thanks!