9

I want to route my.domain.com to the url of my lambda function (which I setup and working via the API Gateway). I can't seem to be able to do this. I also can't seem to be able to to CNAME to anything (so my.domain.com results in a dns error when I CNAME it to domain.com). The normal url (domain.com) is routed to a static S3 bucket and is fine.

The domain was bought on GoDaddy. I changed it so that my GoDaddy Name Servers point to those in a Host Zone which I set up via Route53.

tt_Gantz
  • 2,786
  • 3
  • 23
  • 43
  • What do you mean by "the URL of my Lambda function"? Are you accessing Lambda via an API Gateway configuration? – John Rotenstein Sep 06 '15 at 13:09
  • For your `CNAME` issue, have you configured your GoDaddy name servers to point to Amazon Route 53? For example, [How to move a domain from Godaddy to AWS Route 53](https://stackoverflow.com/questions/12433420/how-to-move-a-domain-from-godaddy-to-aws-route-53) – John Rotenstein Sep 06 '15 at 13:12
  • @JohnRotenstein yes I am. I also configured my GoDaddy name servers to point to Route53 like in the example. Updated the question to clarify this for future readers – tt_Gantz Sep 06 '15 at 13:38

1 Answers1

9

You can't make a CNAME on domain root ie. domain.com because it's zone apex.

To be able to do what you're looking for you need to make a CNAME example.domain.com pointing to CloudFront endpoint generated by API Gateway.

You can follow more detailed API Gateway domain setup instructions.

adamkonrad
  • 6,794
  • 1
  • 34
  • 41