thankful-stone-92805
08/22/2019, 8:25 AMimport { holdingQueue } from './infrastructure/holding-queue'
holdingQueue.onEvent(
'lambda-dev-holding-queue-event',
async () => {
let pulumi = await import('@pulumi/pulumi')
let config = new pulumi.Config('apple-news-syndication')
console.log(config.require('masthead'))
},
{ batchSize: 1 },
)
and on the invoking of the function in AWS I'm getting the following error...
2019-08-22T08:15:19.797Z 516f4272-0d5e-5549-b81b-17aa5c18ea49
{
"errorMessage": "Cannot find module '@pulumi/pulumi'",
"errorType": "Error",
"stackTrace": [
"Function.Module._resolveFilename (module.js:547:15)",
"Function.Module._load (module.js:474:25)",
"Module.require (module.js:596:17)",
"require (internal/module.js:11:18)",
"Promise.resolve.then (/var/task/__index.js:30:53)",
"<anonymous>"
]
}
tall-librarian-49374
08/22/2019, 2:28 PMpulumi
modules are excluded from the upload by design. Why do you need it inside the lambda body?pulumi.Config
won't work in lambda anywaythankful-stone-92805
08/22/2019, 2:32 PMtall-librarian-49374
08/22/2019, 2:34 PMconst v = config.require('masthead')
outside and then v.get()
inside the body.thankful-stone-92805
08/22/2019, 3:02 PMtall-librarian-49374
08/22/2019, 3:02 PM