diff --git a/builder/amazon/common/step_run_spot_instance.go b/builder/amazon/common/step_run_spot_instance.go index d91aa360e..63dc4741a 100644 --- a/builder/amazon/common/step_run_spot_instance.go +++ b/builder/amazon/common/step_run_spot_instance.go @@ -406,7 +406,7 @@ func (s *StepRunSpotInstance) Run(ctx context.Context, state multistep.StateBag) } // Retry creating tags for about 2.5 minutes - err = retry.Config{Tries: 11, ShouldRetry: func(error) bool { + err = retry.Config{Tries: 11, ShouldRetry: func(err error) bool { if awserrors.Matches(err, "InvalidInstanceID.NotFound", "") { return true }