From ae455bff991d2a3036ac41c473e5fb0f857f22d3 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Thu, 5 Oct 2017 17:31:39 -0700 Subject: [PATCH] add debugging help if ec2-upload-bundle fails --- builder/amazon/instance/step_upload_bundle.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builder/amazon/instance/step_upload_bundle.go b/builder/amazon/instance/step_upload_bundle.go index 8e9a5f283..91abfc9b6 100644 --- a/builder/amazon/instance/step_upload_bundle.go +++ b/builder/amazon/instance/step_upload_bundle.go @@ -82,6 +82,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction { } if cmd.ExitStatus != 0 { + if cmd.ExitStatus == 3 { + ui.Error(fmt.Sprintf("Please check that the bucket `%s` "+ + "does not exist, or exists and is writable. This error "+ + "indicates that the bucket may be owned by somebody else.", + config.S3Bucket)) + } state.Put("error", fmt.Errorf( "Bundle upload failed. Please see the output above for more\n"+ "details on what went wrong."))