From 250643d54b373edb2df5a9649f314450079e6557 Mon Sep 17 00:00:00 2001 From: Moss Date: Mon, 2 Dec 2019 10:13:26 +0100 Subject: [PATCH] Remove 5 sec sleep after adding iam instance profile --- builder/amazon/common/step_iam_instance_profile.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/builder/amazon/common/step_iam_instance_profile.go b/builder/amazon/common/step_iam_instance_profile.go index 7221e08d4..634958870 100644 --- a/builder/amazon/common/step_iam_instance_profile.go +++ b/builder/amazon/common/step_iam_instance_profile.go @@ -3,11 +3,12 @@ package common import ( "context" "fmt" - "github.com/aws/aws-sdk-go/aws" "log" - "time" + + "github.com/aws/aws-sdk-go/aws" "encoding/json" + "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/packer/common/uuid" "github.com/hashicorp/packer/helper/multistep" @@ -138,8 +139,6 @@ func (s *StepIamInstanceProfile) Run(ctx context.Context, state multistep.StateB s.roleIsAttached = true state.Put("iamInstanceProfile", aws.StringValue(profileResp.InstanceProfile.InstanceProfileName)) - - time.Sleep(5 * time.Second) } return multistep.ActionContinue