File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -971,22 +971,17 @@ they may not work as expected in the Lambda environment.
971971 }
972972 console . log ( params )
973973
974- // Migrating to v3.
975- const lambda = new aws . sdk . Lambda ( {
976- region,
977- apiVersion : '2015-03-31'
978- } )
979974 const lambdaClient = new LambdaClient ( { region } )
980-
975+ // Migrating to v3.
981976 const scheduleEvents = new ScheduleEvents ( aws . sdk , region )
982977 const s3Events = new S3Events ( aws . sdk , region )
983978 const cloudWatchLogs = new CloudWatchLogs ( aws . sdk , region )
984979
985980 const existsFunction = await ( async ( ) => {
986981 try {
987- await lambda . getFunction ( {
982+ await lambdaClient . send ( new GetFunctionCommand ( {
988983 FunctionName : params . FunctionName
989- } ) . promise ( )
984+ } ) )
990985 return true
991986 } catch ( err ) {
992987 if ( ! this . _isFunctionDoesNotExist ( err ) ) {
You can’t perform that action at this time.
0 commit comments