File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1230,11 +1230,20 @@ describe('#compileIamRole', () => {
1230
1230
// function name can be...
1231
1231
const lambda1 = { Ref : 'MyFunction' } ; // name
1232
1232
const lambda2 = { 'Fn::GetAtt' : [ 'MyFunction' , 'Arn' ] } ; // Arn
1233
+ const lambda3 = { // or, something we don't need special handling for
1234
+ 'Fn::Sub' : [
1235
+ 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${FunctionName}' ,
1236
+ {
1237
+ FunctionName : 'myFunction' ,
1238
+ } ,
1239
+ ] ,
1240
+ } ;
1233
1241
1234
1242
serverless . service . stepFunctions = {
1235
1243
stateMachines : {
1236
1244
myStateMachine1 : getStateMachine ( 'sm1' , lambda1 ) ,
1237
1245
myStateMachine2 : getStateMachine ( 'sm2' , lambda2 ) ,
1246
+ myStateMachine3 : getStateMachine ( 'sm3' , lambda3 ) ,
1238
1247
} ,
1239
1248
} ;
1240
1249
@@ -1260,6 +1269,14 @@ describe('#compileIamRole', () => {
1260
1269
'Arn' ,
1261
1270
] ,
1262
1271
} ,
1272
+ {
1273
+ 'Fn::Sub' : [
1274
+ 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${FunctionName}' ,
1275
+ {
1276
+ FunctionName : 'myFunction' ,
1277
+ } ,
1278
+ ] ,
1279
+ } ,
1263
1280
] ;
1264
1281
expect ( lambdaPermissions [ 0 ] . Resource ) . to . deep . eq ( lambdaArns ) ;
1265
1282
} ) ;
You can’t perform that action at this time.
0 commit comments