Choosing the Best Language for Lambda Authorizer

0
16
Asked By TechieTraveler92 On

I'm looking for advice on which programming language to use for a custom Lambda Authorizer in our API Gateway. We mainly need it to validate JWT tokens. Given that our Lambdas will likely stay warm almost all the time due to multiple applications and thousands of users, I'm wondering what language would help us optimize both latency and cost. We currently have a proof of concept using Node.js, but I'm curious if switching to a different language could offer any real benefits. Does it even make a difference?

2 Answers

Answered By CodeWizard88 On

If you find that a lot of your JWTs are the same, consider implementing response caching. This can really help with latency since cached responses will speed things up significantly. Also, if performance is a big concern, you might want to look at languages like Rust or Go, which are known to be faster than Node.js in many cases.

Answered By DevGuru22 On

I came across this article that compares Lambda runtime performance. It suggests that switching to Rust or Go could give you better performance over Node.js. Even though the study is a bit old, it aligns with other findings I've seen. It might be worth checking it out to see if it helps guide your decision!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.