Serverless: Setting up a NodeJS Lambda with a Postgres DB hosted in RDS

zhifei
4 min readJan 2, 2023

Note: The following is a combination of research done using ChatGPT, StackOverflow, and some experimentation. I’m not an expert in the serverless framework at this time of writing, so I can’t guarantee the effectiveness of the solution provided. At least for now, it works for my current use case.

My goal is relatively simple: I want to setup an Express backend on a Lambda, while connecting it to a Postgres DB that’s hosted in a RDS. And I want to do all of these using the Serverless Framework without having…

--

--

zhifei

Software engineer. Jack of all stacks, master of none.