AWS Custom Domain Name for Lambdas


I’m working with AWS Lambdas and I deploy them using Serverless. Everytime I deploy any function I receive this kind of URL to hit the service:{stage}/{function}

where ‘stage’ is either dev or qa, and ‘function’ is the name of my lambda function.

I’m trying to access to my lambdas using a more friendly URL. I followed this tutorial from AWS docs:

I can not make it work. I have already the certificates created, my company did it. So to me, this just needs to be as simple as select the name of your domain and attach it to your Lambda API gateway.

These are the steps I’m doing:

1) I create a Custom Domain Name here The page offers me automatically the certificate. I’m using some made up name like I also tried using a fully qualified domain name from my company which is hosted in our AWS account. None of both worked.

2) Then from the same page I select the base path, the destination (which is my lambda) and the stage. After saving it, the page provides me with a value called ‘Distribution Domain Name’, it looks like

3) Then I go to Amazon 53 and I create a new Hosted Zone. Again, I’m sure here if I need something totally made up or a real domain. Then I create a new A record for a ip address, I mark Alias-true, and I put the value from above “Distribution Domain Name”

And that’s it. Those are the steps I’m doing. Then when I tried to hit my Lambda, I followed the instructions from the page I put above in the section “Root URLs of APIs with default and custom domain names”.

I followed this process a couple of times and I’m really wondering if that page is ok. When I hit my lambdas with the custom domain name I get a 404 or a “can not resolve this host”.

Does anyone have followed that process from that page from AWS and had good results?

UPDATE Thu Jul 13 12:23

Here are some pictures of my settings:

My custom domain name

enter image description here

enter image description here

I get “Could not resolve host” either for


“Again, I’m sure here if I need something totally made up or a real domain” you need a real domain name. Also since you needed to create a new hosted zone, that means your company does not currently use AWS Route 53 for their DNS. You’ll have to point something like to from whatever domain registrar your company uses.

Leave a Reply