diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index e0c934c16..cd8a3d006 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -74,7 +74,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) { "-s {{.SecretKey}} " + "-d {{.BundleDirectory}} " + "--batch " + - "--location {{.Region}} " + + "--url https://s3-{{.Region}}.amazonaws.com " + "--retry" } diff --git a/builder/amazon/instance/step_upload_bundle.go b/builder/amazon/instance/step_upload_bundle.go index 8e2289ae7..ec654aa61 100644 --- a/builder/amazon/instance/step_upload_bundle.go +++ b/builder/amazon/instance/step_upload_bundle.go @@ -32,18 +32,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction { return multistep.ActionHalt } - // See GH-729 and http://goo.gl/rNZiCs - regionName := region.Name - if regionName == "us-east-1" { - regionName = "US" - } - config.BundleUploadCommand, err = config.tpl.Process(config.BundleUploadCommand, uploadCmdData{ AccessKey: config.AccessKey, BucketName: config.S3Bucket, BundleDirectory: config.BundleDestination, ManifestPath: manifestPath, - Region: regionName, + Region: region.Name, SecretKey: config.SecretKey, }) if err != nil { diff --git a/website/source/docs/builders/amazon-instance.html.markdown b/website/source/docs/builders/amazon-instance.html.markdown index 5e43e32f2..b5337e1ce 100644 --- a/website/source/docs/builders/amazon-instance.html.markdown +++ b/website/source/docs/builders/amazon-instance.html.markdown @@ -277,7 +277,7 @@ sudo -n ec2-upload-bundle \ -s {{.SecretKey}} \ -d {{.BundleDirectory}} \ --batch \ - --location {{.Region}} \ + --url https://s3-{{.Region}}.amazonaws.com \ --retry ```