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
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.
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
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically