# Linking service to custom API Gateway domain

**URL:** <https://forum.serverless.com/t/linking-service-to-custom-api-gateway-domain/2131>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [June 23, 2017, 5:34pm UTC](https://forum.serverless.com/t/linking-service-to-custom-api-gateway-domain/2131 "2017-06-23T17:34:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krisalexander200](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/krisalexander200/32/325_2.png) [@krisalexander200](https://forum.serverless.com/u/krisalexander200)\
**Post date:** [June 23, 2017, 5:34pm UTC](https://forum.serverless.com/t/linking-service-to-custom-api-gateway-domain/2131/1 "2017-06-23T17:34:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hassankhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hassankhan/32/473_2.png) [@hassankhan](https://forum.serverless.com/u/hassankhan)\
**Post date:** [June 24, 2017, 3:58pm UTC](https://forum.serverless.com/t/linking-service-to-custom-api-gateway-domain/2131/2 "2017-06-24T15:58:26Z")

</div>

[This plugin](https://github.com/amplify-education/serverless-domain-manager) should do the trick for you 😉

---

<div class="post-metadata">

**Author:** ![krisalexander200](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/krisalexander200/32/325_2.png) [@krisalexander200](https://forum.serverless.com/u/krisalexander200)\
**Post date:** [June 24, 2017, 5:25pm UTC](https://forum.serverless.com/t/linking-service-to-custom-api-gateway-domain/2131/3 "2017-06-24T17:25:09Z")

</div>

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