diff --git a/src/private/function.ts b/src/private/function.ts index 6bd7d0b663..b6e6cd1851 100644 --- a/src/private/function.ts +++ b/src/private/function.ts @@ -34,7 +34,15 @@ export class SolutionNodejsFunction extends NodejsFunction { ...props, bundling: props?.bundling ? { ...props.bundling, + forceDockerBundling: true, externalModules: props.bundling.externalModules?.filter(p => p === '@aws-sdk/*') ?? [], + environment: { + NODE_ENV: 'production', + }, + esbuildArgs: { // Pass additional arguments to esbuild + '--log-limit': '3000', + '--log-level': 'debug', + }, } : { externalModules: [], },