This article will describe how we created a service, to generate PDF documents for a given HTML page, using AWS Lambda service.

Since the function itself to generate the PDF is quite trivial, literally ~20 line of codes, the focus will be mainly on the operational side of things and the scaffolding of the project to allow the lambda service to be built and deployed with a CI/CD pipeline.

What actually is AWS Lambda Service

You can find plenty of articles about AWS Lambda (if you are interested see the official AWS Lambda).

In few words the Lambda service allows you to run arbitrary code (functions), within Amazon services ecosystem, that you can invoke from a wide variety of Event Sources (see Supported Event Source). The main benefit is that AWS scales automatically in response of increased traffic, the price model reflects this peculiarity allowing you to pay pretty much for what you use. Further appealing point is that the first 1 Million requests per month are free.

High level architecture

From a high level this is how the system looks like.

Image for post

#cloud-computing #cloud

Create a PDF service with AWS Lambda
2.20 GEEK