In the previous chapter, we saw how we can invoke Lambda functions when a client requests an HTTP source. It was not so different from a classical web application, and instead of a controller class always in memory, Lambda runtime located our code piece to execute it and removed it from memory after it finished its job. We only paid for what we used, and we did not have to maintain any infrastructure on our own.
Is it the only way to benefit from Lambdas? Definitely not.
Let's assume that our forum application got very popular and we wanted to let our users upload their profile pictures. In different parts of our forum, we will be using three different sizes of profile pictures, so whenever a user uploads a new picture, we should resize the image on a data storage. The first thing that comes to mind is to create another Lambda function to respond...