Why I built it

I wanted a tool that shows how an investment grows over time once you factor in the annual yield and regular contributions. The fun part for me was the back end. It was a small exercise in running a Python function on AWS Lambda and exposing it to the web through API Gateway.

How it works

You enter the number of years, your starting amount, how much you add each period, the expected annual yield, and whether contributions are monthly or yearly. The React front end sends those numbers to a REST endpoint on API Gateway, which invokes a Python function on Lambda. The function runs the compound interest calculation and sends the result back to the page.

Most of the time I'm the only one making requests, which is exactly why serverless fits. There is no server sitting idle, and the bill for a tool like this rounds to zero.

Choices I made

The same thing could be done with an Application Load Balancer in front of the Lambda. I kept it to API Gateway to keep it simple and cheap, since a load balancer costs money every hour whether anyone uses it or not.