Skip to content

Commit 3d43c77

Browse files
committed
add spawn
1 parent bf779de commit 3d43c77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/shared/sam/localLambdaRunner.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { ToolkitError, UnknownError } from '../errors'
3131
import { SamCliError } from './cli/samCliInvokerUtils'
3232
import fs from '../fs/fs'
3333
import { asEnvironmentVariables } from '../../auth/credentials/utils'
34+
import { getSpawnEnv } from '../env/resolveEnv'
3435

3536
const localize = nls.loadMessageBundle()
3637

@@ -287,11 +288,11 @@ export async function runLambdaFunction(
287288
getLogger().info(localize('AWS.output.sam.local.startRun', 'Preparing to run locally: {0}', config.handlerName))
288289
}
289290

290-
const envVars = {
291+
const envVars = await getSpawnEnv({
291292
...process.env,
292293
...(config.awsCredentials ? asEnvironmentVariables(config.awsCredentials) : {}),
293294
...(config.aws?.region ? { AWS_DEFAULT_REGION: config.aws.region } : {}),
294-
}
295+
})
295296

296297
const settings = SamCliSettings.instance
297298
const timer = new Timeout(settings.getLocalInvokeTimeout())

0 commit comments

Comments
 (0)