diff --git a/packages/@aws-cdk/lambda-layer-awscli/lib/private/package-loading-functions.ts b/packages/@aws-cdk/lambda-layer-awscli/lib/private/package-loading-functions.ts index 5c820eca1edaa..38fbee6657d04 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/lib/private/package-loading-functions.ts +++ b/packages/@aws-cdk/lambda-layer-awscli/lib/private/package-loading-functions.ts @@ -112,5 +112,5 @@ export function findInstallDir(): string | undefined { if (!require.main?.paths) { return undefined; } - return require.main.paths[0]; + return path.dirname(require.main.paths[0]); } \ No newline at end of file