serverless-lumigo-plugin icon indicating copy to clipboard operation
serverless-lumigo-plugin copied to clipboard

Using Docker image based lambda raises TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string

Open matthieudesprez opened this issue 1 year ago • 0 comments

It seems to come from

async createWrappedPythonFunction(func, token, options, isZip) {
  this.verboseLog(`wrapping [${func.handler}]...`);
  
  const localName = func.localName;
  
  // e.g. functions/hello.world.handler -> hello.world.handler
  const handler = path.basename(func.handler);
  ...

as no handler is defined in the function, path.basename can't work properly, while it's a valid serverless configuration according to https://www.serverless.com/blog/container-support-for-lambda

matthieudesprez avatar Jul 05 '23 09:07 matthieudesprez