jpadilla / pyjwt

JSON Web Token implementation in Python
https://pyjwt.readthedocs.io
MIT License
5k stars 675 forks source link

pyjwt error in aws - Error: Fail to fetch data from the url, err: "<urlopen error [Errno -5] No address associated with hostname>" #906

Closed pskacct closed 11 months ago

pskacct commented 11 months ago

Please refer to our StackOverflow tag for guidance.

PyJWT works when used via aws sam but fails after deploying to aws. When the lambda function i invoked locally via aws sam the access token is validated. the same lambda function fails after deploying it to aws.

versions: Python 3.9 pyjwt[crypto]==2.6.0

Error raised by PyJWT when calling: jwk_client.get_signing_key(hdr["kid"]).key:

Error raised: Error: Fail to fetch data from the url, err: "<urlopen error [Errno -5] No address associated with hostname>"