Skip to content

Commit bf779de

Browse files
committed
tt
1 parent 064ef63 commit bf779de

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { showMessageWithCancel } from '../utilities/messages'
3030
import { ToolkitError, UnknownError } from '../errors'
3131
import { SamCliError } from './cli/samCliInvokerUtils'
3232
import fs from '../fs/fs'
33-
import { getSpawnEnv } from '../env/resolveEnv'
33+
import { asEnvironmentVariables } from '../../auth/credentials/utils'
3434

3535
const localize = nls.loadMessageBundle()
3636

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

290-
const envVars = await getSpawnEnv({
290+
const envVars = {
291291
...process.env,
292+
...(config.awsCredentials ? asEnvironmentVariables(config.awsCredentials) : {}),
292293
...(config.aws?.region ? { AWS_DEFAULT_REGION: config.aws.region } : {}),
293-
})
294+
}
294295

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

0 commit comments

Comments
 (0)