'No response from invoke container when running sam local invoke

Trying to test a basic lambda locally that runs fine in AWS but I keep getting

No response from invoke container for MyLambdaXXXXXXXX

'tsc' and 'synth' run fine and I get a proper cdk.out

The invoke command is

sam local invoke --region us-east-1 --env-vars .env.json -t ./cdk.out/my-project.template.json -e events/example.event.json MyLambdaXXXXXXXX

There is no api or anything docker related that I find in similar questions like the few listed below.

The only output I see is this (no logs from even the first line of the lambda)

Invoking index.execute (nodejs14.x)
Skip pulling image and use local one: public.ecr.aws/sam/emulation-nodejs14.x:rapid-1.46.0-x86_64.

Mounting /path-to-my-project/my-project/cdk.out/asset.aaaaa9999999cd5a9f38e9c4e503cc9c9bdf8ccdc8f9999991b12b6161e99999 as /var/task:ro,delegated inside runtime container
No response from invoke container for MyLambdaXXXXXXXX

Process finished with exit code 0

If it matters my handler structure for my lambda is async

export const execute = async (sqsEvent: SQSEvent): Promise<PutEventsCommandOutput> => {
  await someAsyncStuffWithDocumentDB()
}

And I'm using NodejsFunction cdk with bundling like this

bundling: {
  minify: true,
  sourceMap: true,
  externalModules: ['aws-lambda', 'aws-sdk'],
  loader: { '.pem': 'file' }, // cert for DocumentDB
},


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source