public IFunction AddPermissionToLambda(string permissionId, IFunction lambdaFunction, string principal, string action) { lambdaFunction.AddPermission(permissionId, new Permission { Action = action, Principal = new ServicePrincipal(principal) }); return(lambdaFunction); }