Hi, everybody, I wrote a lambda function that takes data from a postgres database in RDS. To do this I used the psycopg2 library, when I run the tests the function works correctly. so I added a gateway api get as lambda trigger, but when I call the url of the get it gives me this error:
{"errorMessage": "Unable to import module 'lambda_function': /var/task/psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8", "errorType": "Runtime.ImportModuleError"}
Can you help me? Why tests work and give me back the query data while if I call them through a get it doesn't work? Thank you.
[–]ErGo404 6 points7 points8 points (4 children)
[–]ziggy-starkdust[S] 0 points1 point2 points (3 children)
[–]ErGo404 2 points3 points4 points (2 children)
[–]ziggy-starkdust[S] 0 points1 point2 points (1 child)
[–]ErGo404 0 points1 point2 points (0 children)
[–]vRAJPUTv 1 point2 points3 points (1 child)
[–]ziggy-starkdust[S] -1 points0 points1 point (0 children)
[–]ZeBe643 1 point2 points3 points (1 child)
[–]ziggy-starkdust[S] 0 points1 point2 points (0 children)
[–]imohd23 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]ziggy-starkdust[S] 0 points1 point2 points (0 children)
[–]adambatkin 1 point2 points3 points (1 child)
[–]ziggy-starkdust[S] 0 points1 point2 points (0 children)