File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ function getRedshiftDataPermissions(action, state) {
362362function getLambdaPermissions ( state ) {
363363 // function name can be name-only, name-only with alias, full arn or partial arn
364364 // https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestParameters
365- const functionName = state . Parameters . FunctionName ;
365+ const functionName = getParameterOrArgument ( state , ' FunctionName' ) ;
366366 if ( _ . isString ( functionName ) ) {
367367 const segments = functionName . split ( ':' ) ;
368368
@@ -429,10 +429,11 @@ function getLambdaPermissions(state) {
429429 } ] ;
430430 }
431431
432- if ( state . Parameters [ 'FunctionName.$' ] ) {
432+ if ( getParameterOrArgument ( state , 'FunctionName.$' ) ) {
433+ const allowedFunctions = getParameterOrArgument ( state , 'AllowedFunctions' ) ;
433434 return [ {
434435 action : 'lambda:InvokeFunction' ,
435- resource : state . Parameters . AllowedFunctions ? state . Parameters . AllowedFunctions : '*' ,
436+ resource : allowedFunctions || '*' ,
436437 } ] ;
437438 }
438439
You can’t perform that action at this time.
0 commit comments