Possible to use with NestJS ?
Since NestJS is a framework built on express, and this project uses aws-serverless-express which is supposed to work with any express framework, I was hoping there would be a way to use this plugin for NestJS projects.
Any ideas ?
You should be able to as express is a valid HTTP transport for nest js. See https://github.com/serverless-components/express/issues/12 as to how you would make it work with TS.
I am currently in the same situation and I must state, this will not be an answer for you, unfortunately.
Judging from the current state of the Express component for Serverless, there is an inherent "clash" between the asynchronous nature of bootstrapping a NestJS application instance and the synchronous handler code implemented within the Express component.
In essence, for the Express Component to work, you need to export your Express application instance from your app.js. The Express Component Lambda handler will require() your app.js (hence get your Express application instance) and handle the incoming Lambda event.
In a NestJS environment though, you would need to create your Nest application first, which is an asynchronous operation through NestFactory.create().
Although it should not be really difficult to create a custom component for Express-backed NestJS based off of the Express one.