Serverless with TypeScript, convert from plain JavaScript

You seemed to change your serverless.yml file between those two versions (vanilla javascript and typescript version).

The name of the function that is called is still “handler”, yet in the serverless.yml file you are calling “getData” (corresponding to the file name)

Serverless framework is build around plain javascript functions, that are deployed. It doesn’t know about your filenames once its compiled.

If you are using ts-node or if you are compiling your .ts files manually, you can always check the generated output source code, that will be executed.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top