miniature-piano-36287
10/22/2021, 4:06 PMnpm library
and the other one is a web service
, either the web service and the npm library have the following Pulumi dependencies:
package.json -> "dependencies"
"@pulumi/aws": "^4.23.0",
"@pulumi/awsx": "^0.32.0",
"@pulumi/pulumi": "^3.0.0",
The web service also dependes of the npm library. When i push changes to AWS with the command pulumi up -y
everything works fine, but when i make a request to the ApiGateway that calls one of the created lambda functions i'm having this error output in Cloudwatch:
Cannot find module '@pulumi/pulumi'
One of the functions in the npm library needs that dependency but i looks like Pulumi is excluding it because regardless the package.json shows that dependency it doesn't appear in node_modules.
Anyone have an idea of what could be happening in that case?
Thank you.billowy-army-68599
miniature-piano-36287
10/22/2021, 4:13 PMbillowy-army-68599
miniature-piano-36287
10/22/2021, 4:33 PMbillowy-army-68599
miniature-piano-36287
10/22/2021, 4:50 PMbillowy-army-68599
Note that pulumi will not include @pulumi/... packages with the Lambda. These packages exist solely to provide deployment time functionality, and do not contain any code that can work properly at run time. They are automatically stripped from a Lambda both to prevent accidental usage and to help reduce the size of the uploaded Lambda.
miniature-piano-36287
10/22/2021, 4:59 PM