Let the following lambda handler:
export const handler = async (event:any) => {
console.log("[PROCESS] Starting process");
return {status: "OK"};
}
And when executed from the AWS test console. The cloudWatch logs show the following.
As shown in the logs there is a duplication in the log info message, but the first one has an undefined request ID. This happens in coldstart, is this a normal behavior for lambda?
Just in case this is the esbuild command that I'm using for bundling the code of this lambda function.
esbuild ./src/my-lambda/index.ts --bundle --sourcemap --platform=node --target=es2020 --loader:.node=file --outfile=dist/lambda-functions/my-lambda/index.js
