It seems that the request path setup in AWS API gateway is case sensitive. Can anyone suggest any solution to make the request path to be case insensitive
For example: https://api-gw.some-domain/health is accessible whereas https://api-gw.some-domain/Health is not accessible. (404)
Unfortunately API Gateway, like most of AWS' offerings, is case-sensitive by design.
You therefore have two options:
Use CloudFront with Lambda@Edge to re-write your requests (this is quite involved, but a good tutorial can be found here: https://linuxacademy.com/howtoguides/posts/show/topic/19955-url-rewriting-in-aws-cloudfront)
Use BasePath mapping and a Proxy Resource so that you can have a single lambda that receives all requests and then dispatches/responds accordingy.
I would recommend the CloudFront approach, as its cheaper and easier to maintain. However for a small API you might be tempted to go for the second, especially if you can host the whole API in a single lambda.
n.b. The internet is case-sensitive (and mostly it's lowercase), for example: http://www.bbc.co.uk/news/world-europe-12083491 vs http://www.bbc.co.uk/news/world-Europe-12083491
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With