When the following is installed and enabled the project doesn't work when deployed to aws lambda
if you disable any of them everything works fine (except the disabled portion ofc)
More info in https://github.com/Shereef/nestjs-swagger-serverless-layers-datadog-issue/blob/main/README.md
To test this out
- Add
DATADOG_API_KEYenv var with your datadog env vars - Add AWS key id and secret to your env vars
AWS_ACCESS_KEY_ID&AWS_SECRET_ACCESS_KEY - run
npm i - run
npx serverless deploy --verbose - visit the url from the console output
It should display swagger but it doesn't instead {"message": "Internal server error"}
see bottom of https://github.com/Shereef/nestjs-swagger-serverless-layers-datadog-issue/blob/main/README.md full output
if you append /v1 to the url it should show Hello World! but it doesn't
i.e. https://qwerty.execute-api.us-east-2.amazonaws.com/dev/ should show swagger
i.e. https://qwerty.execute-api.us-east-2.amazonaws.com/dev/v1 should show Hello World!
The three above combined break the lambda function
P.S. if you switch to any of the following branches the project works as expected
disable-serverless-layers-workspreview changesdisable-datadog-workspreview changesdisable-swagger-workspreview changes
Serverless.js plugin that implements AWS Lambda Layers which reduces drastically lambda size, warm-up and deployment time. - GitHub - agutoli/serverless-layers: Serverless.js plugin that implements...
Serverless plugin to automagically instrument your Lambda functions with Datadog - GitHub - DataDog/serverless-plugin-datadog: Serverless plugin to automagically instrument your Lambda functions wi...
OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas: - GitHub - nestjs/swagger: OpenAPI (Swagger) module for Nest framework (node.js)
Weird issue preventing breaking lambda when using @nestjs/swagger + serverless-layers + serverless-plugin-datadog - nestjs-swagger-serverless-layers-datadog-issue/README.md at main · Shereef/nestjs...