0

I have a domain in aws route53.

My frontend is routed to that domain from cloudfront via alias and works perfectly.

My backend sits on aws lambda and I want to put it behind my domain so my users can authorize using jwt cookies.

I created api.mydomain.com in aws api gateway with Base Path Mappings of /production -> pointing to my lambda and tried to add my lambda using CNAME and Alias but neither worked, they return 404 when i call https://api.mydomain.com/production/login

but when i call https://xxxx.execute-api.xxxx.amazonaws.com/production/login it works perfectly.

Rafael Marques
  • 1,501
  • 15
  • 23
yonadav bar ilan
  • 550
  • 6
  • 10

1 Answers1

2
  1. Create Record Set
  2. Name: api.yourdomain.com
  3. Type: Choose A – IPv4 address.
  4. Type: Alias Choose Yes.
  5. Alias Target:

Choose the list, and find the category API Gateway example: https://xxxx.execute-api.xxxx.amazonaws.com/production/login

Create, and then you are done. It will work

Ganesh Pandey
  • 5,216
  • 1
  • 33
  • 39