https://pantsbuild.org/ logo
#general
Title
# general
h

handsome-sunset-98068

08/29/2022, 6:03 PM
Hi, I am getting this strange error after deploying my django proj on lambda. My lambda fn url - https://gknygoefhm3vdp4k7yso7mqudy0wuzaj.lambda-url.ap-south-1.on.aws I have just endpoint setup 'test/' and that works fine locally. Link to the repo - https://github.com/reksus/tarun-debug
e

enough-analyst-54434

08/29/2022, 6:09 PM
You should be headed to the lambda logs next on AWS to see what's going on. You have access to that and we do not (I hope!); so you should provide that data too if you can't make sense of it.
r

refined-addition-53644

08/29/2022, 6:17 PM
I get this error message
h

handsome-sunset-98068

08/29/2022, 6:19 PM
This is fine cuz the debug mode is on there's no view on the base path.. only if you append /test/ you will see the error.
this is expected result.
r

refined-addition-53644

08/29/2022, 6:21 PM
yeah so time to dig into lambda logs.
h

handsome-sunset-98068

08/29/2022, 6:48 PM
Here's a snippet from the logs. I have spent quite a bit of time to find the fix.
r

refined-addition-53644

08/29/2022, 7:42 PM
Yeah can’t see much here in the log. I suppose you have configured an API gateway? Can you manually run the lambda function in AWS itself? There is usually a
Test
tab when you click on the lambda function from where you can run it.
h

handsome-sunset-98068

08/30/2022, 10:43 AM
This was a django specific issue in the urls (apparently the 'test' endpoint should not have ended with '/' ), it was tricky to find cuz it was working as expected while using django's runserver cmd, but failing when deployed on lambda.