The benefits of the lambda functions are endless. The good thing is that you can create anything in a few clicks. I'm a big fan of the services that offer AWS. You can start with something really simple and apply more complexity adding more services.
On this opportunity, I will show you how was integrate some components that AWS offers to us to make the final product.
In this case, it was an online photomontage that merges our wanted message into a template that I choose:
The next step was to find a module on npm that resolve our requirement to manipulate images easily. Jimp looks good to me because not have third dependencies and your documentation is complete enough.
With the help of Claudia.js, it was really easy to automate deployments of the lambda functions just with a few commands from the console.
The user interacts with an interface, this is located in a bucket (Amazon S3). The form located there, dispatch a POST to an API Rest. Here our AWS API Gateway takes the petition and executes a lambda function to generate the wanted photo in a few seconds.
- Amazon S3
- Amazon API Gateway
- Amazon Lambda
If you want to see all the components working, can you visit the online demo clicking here. This same concept could be used for multiple scenarios.
The part most important of this development is the lambda function. Here you can see the code used to generate the photomontage.
What other scenario do you imagine using this?.