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