File tree 1 file changed +4
-3
lines changed
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) {
362
362
function getLambdaPermissions ( state ) {
363
363
// function name can be name-only, name-only with alias, full arn or partial arn
364
364
// 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' ) ;
366
366
if ( _ . isString ( functionName ) ) {
367
367
const segments = functionName . split ( ':' ) ;
368
368
@@ -429,10 +429,11 @@ function getLambdaPermissions(state) {
429
429
} ] ;
430
430
}
431
431
432
- if ( state . Parameters [ 'FunctionName.$' ] ) {
432
+ if ( getParameterOrArgument ( state , 'FunctionName.$' ) ) {
433
+ const allowedFunctions = getParameterOrArgument ( state , 'AllowedFunctions' ) ;
433
434
return [ {
434
435
action : 'lambda:InvokeFunction' ,
435
- resource : state . Parameters . AllowedFunctions ? state . Parameters . AllowedFunctions : '*' ,
436
+ resource : allowedFunctions || '*' ,
436
437
} ] ;
437
438
}
438
439
You can’t perform that action at this time.
0 commit comments