NodeJS Lambda Authorizer for JWT Access Tokens

The Golden Gate Bridge at sunset — photo taken by me while on my bike commute home the other night

Not paying for Medium? The gist of this post can also be found here: https://blog.concannon.tech/tech-talk/nodejs-jwt-lambda-authorizer/.

I recently created a Lambda Authorizer to secure AWS API Gateway endpoints with JSON Web Tokens (JWTs). I found that many tutorials exist for Lambda Authorizer creation, but I found a lack of examples for such a script in NodeJS. Here’s a nice…