deno-lambda icon indicating copy to clipboard operation
deno-lambda copied to clipboard

Invoke lambda locally with serverless invoke

Open fomalhaut79 opened this issue 4 years ago • 3 comments
trafficstars

I am not able to invoke lambda locally with Serverless framework with sls invoke local -f ... All works well when I deploy my lambda, but when I try to run it locally I have the following error: Failed to run docker for provided.al2 image. Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap] If it is possible, could you provide some instructions how to do it. Thanks

fomalhaut79 avatar Dec 27 '20 01:12 fomalhaut79

I think this is an issue with sls deploy not working with arn layers (or that's not wired up correctly?).

I wonder if there is a way to do this using the docker image: https://hub.docker.com/r/hayd/deno-lambda

I am assuming this wasn't using that...

--

Edit: I see:

Serverless: Invoke aws:common:moveArtifactsToPackage

 Type Error ----------------------------------------------

  TypeError: layer.split is not a function

when trying to run this locally with the example-serverless.

hayd avatar Jun 04 '21 05:06 hayd

we kind of need something like serverless-offline for deno-lambda.

deathemperor avatar Jun 09 '21 09:06 deathemperor

I remember there being an issue for ~custom~ provided.al2 runtime on serverless-offline but can't find it. The serverless example also needs an update...

My suspicion is you may be able to do this already with the --useDocker option (assuming you use the docker container.

hayd avatar Jun 09 '21 16:06 hayd