From 58444627c1c100bc3cf060ed4b10d5749372af23 Mon Sep 17 00:00:00 2001 From: Ross Timson Date: Thu, 13 Feb 2014 09:36:45 +0000 Subject: [PATCH] Use --url flag rather than --location for ec2-upload-bundle AWS docs (http://goo.gl/rNZiCs) show that --location is deprecated and to use the --url flag and reference the region endpoint instead. --- builder/amazon/instance/builder.go | 2 +- builder/amazon/instance/step_upload_bundle.go | 8 +------- .../source/docs/builders/amazon-instance.html.markdown | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) 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 ```