File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/core/src/shared/sam Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import { showMessageWithCancel } from '../utilities/messages'
3030import { ToolkitError , UnknownError } from '../errors'
3131import { SamCliError } from './cli/samCliInvokerUtils'
3232import fs from '../fs/fs'
33- import { getSpawnEnv } from '../env/resolveEnv '
33+ import { asEnvironmentVariables } from '../../auth/credentials/utils '
3434
3535const 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 ( ) )
You can’t perform that action at this time.
0 commit comments