Node.js - Linking an Amazon Web Services lambda with it TypeScript handler

AWS Lambda

Lambda services allow executing some source code on the cloud. The execution can be set to be triggered by some AWS events. Lambda functions can be deployed using several deployment frameworks. The supported deployment frameworks are listed on this page. When a lambda function is created and its runtime is Node.js, the TypeScript and Frameworks extension is responsible for linking the lambda objects and their triggers with the TypeScript handler functions.

Basic example

Let us consider a source code defining a lambda function that has two triggers: an SQS queue and an API Gateway. The lambda function has a nodejs runtime and the handler function is given by the handler function fullname. If the lambda function is deployed using a supported deployment framework (such as CloudFormation), the analysis will create a lambda function, an SQS receiver, and an API Gateway objects. Each of these objects has a runtime property (nodejs) and a handler property with the function fullname.  If the current extension finds a TypeScript function matching the handler fullname a link to that function will be added from the lambda function, the SQS queue, and the API Gateway objects.