I have written a python lambda to redirect unauthorized users to Cognito. The lambda works when I run a test event in the lambda console, but when I try to hit the CloudFront distribution, I get the following error:
[ERROR] Runtime.ImportModuleError: Unable to import module 'app': No module named
'pyjwt'
Traceback (most recent call last):
I am not referring to pyjwt in my code. I am doing this import jwt
, and I my lambda uses these packages. I have tried deleting the lambda@edge association and the lambda.
I'm completely stuck at this point. What can I try next?