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.