Going Serverless: My Linear Regression API on AWS Lambda

Logan Cooper
Sep 4, 2020 · 7 min read

About a year ago, I had a fun idea for a small side project. I wanted to build an API to do a simple linear regression on two series of data. If you don’t know what a linear regression is, it’s basically a way of calculating the correlation between two variables — it’s not super important to understanding this post, but if you want to learn more, you can get an idea of what it is here.

A scatter plot with a red regression line drawn through it
Basically it’s how you find the red line