From 2b581949f7b677b70c657dd69a905970e94662d4 Mon Sep 17 00:00:00 2001 From: Fake Bob Dobbs Date: Sun, 8 Mar 2020 10:42:24 -0400 Subject: [PATCH] Avoid creating default state machine role when an external role is set --- aws/step/step.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/step/step.go b/aws/step/step.go index 11ecb89f9..82bfe9361 100644 --- a/aws/step/step.go +++ b/aws/step/step.go @@ -919,7 +919,7 @@ func (sm *StateMachine) StateMachineNamedDecorator(stepFunctionResourceName stri }, } var iamRoleResourceName string - if len(lambdaFunctionResourceNames) != 0 { + if len(lambdaFunctionResourceNames) != 0 && sm.roleArn == nil { statesIAMRole := &gocf.IAMRole{ AssumeRolePolicyDocument: AssumePolicyDocument, }