Commit 58444627 authored by Ross Timson's avatar Ross Timson

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.
parent 1a57e389
...@@ -74,7 +74,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) { ...@@ -74,7 +74,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
"-s {{.SecretKey}} " + "-s {{.SecretKey}} " +
"-d {{.BundleDirectory}} " + "-d {{.BundleDirectory}} " +
"--batch " + "--batch " +
"--location {{.Region}} " + "--url https://s3-{{.Region}}.amazonaws.com " +
"--retry" "--retry"
} }
......
...@@ -32,18 +32,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction { ...@@ -32,18 +32,12 @@ func (s *StepUploadBundle) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt 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{ config.BundleUploadCommand, err = config.tpl.Process(config.BundleUploadCommand, uploadCmdData{
AccessKey: config.AccessKey, AccessKey: config.AccessKey,
BucketName: config.S3Bucket, BucketName: config.S3Bucket,
BundleDirectory: config.BundleDestination, BundleDirectory: config.BundleDestination,
ManifestPath: manifestPath, ManifestPath: manifestPath,
Region: regionName, Region: region.Name,
SecretKey: config.SecretKey, SecretKey: config.SecretKey,
}) })
if err != nil { if err != nil {
......
...@@ -277,7 +277,7 @@ sudo -n ec2-upload-bundle \ ...@@ -277,7 +277,7 @@ sudo -n ec2-upload-bundle \
-s {{.SecretKey}} \ -s {{.SecretKey}} \
-d {{.BundleDirectory}} \ -d {{.BundleDirectory}} \
--batch \ --batch \
--location {{.Region}} \ --url https://s3-{{.Region}}.amazonaws.com \
--retry --retry
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment