Skip to content

Commit 77213a3

Browse files
author
Sergii Kovalev
committed
Custom function role test
1 parent 9203c1f commit 77213a3

File tree

3 files changed

+456
-1
lines changed

3 files changed

+456
-1
lines changed

lib/stackops/lambdaRole.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStac
3535
const role = stageStack.Resources.IamRoleLambdaExecution;
3636

3737
// Set role name
38-
_.last(role.Properties.RoleName['Fn::Join']).push(this._alias);
38+
if (role.Properties.RoleName['Fn::Join']) {
39+
_.last(role.Properties.RoleName['Fn::Join']).push(this._alias);
40+
}
3941

4042
stageStack.Resources[roleLogicalId] = stageStack.Resources.IamRoleLambdaExecution;
4143
delete stageStack.Resources.IamRoleLambdaExecution;

0 commit comments

Comments
 (0)