Hey everyone, first time posting and new to Pulumi...
# getting-started
b
Hey everyone, first time posting and new to Pulumi - thanks for having me here!Running into a problem deploying a project to Lambda but could anyone help? I’m using this tutorial to deploy Express onto Lambda through Pulumi: https://www.pulumi.com/blog/running-a-serverles-nodejs-http-server-on-aws-and-azure/ The index.js file I am using looks like this
"use strict";
const cloud = require("@pulumi/cloud-aws");
const server = new cloud.HttpServer("reviews-getter", () => {
 
const app = require('./app/app');
 
return app;
})
module.exports = server;
./app/app.js
is the express object exported from another file. The problem is that after
pulumi up
, index.js is successfully converted into a lambda function but the ./app folder is not included in the code. I therefore get an error saying that module ‘./app/app’ cannot be found. Moving the code in ./app/app.js into index.js does not help either because of the other dependencies in ./app which cannot be accessed.
cloud:functionIncludePaths: ./app/
is already declared in the config so could someone please advise on how to resolve this? Thanks in advance!