Giter VIP home page Giter VIP logo

Comments (12)

joshhunt avatar joshhunt commented on June 15, 2024

Changing my bucket ID to one without periods fixed the issue, but I guess this one is worth looking into...

from gulp-awspublish.

pgherveou avatar pgherveou commented on June 15, 2024

I use it with buckets with period,
checkout knox the module we suse to talk to s3
https://github.com/LearnBoost/knox#style

On Sun, Jul 27, 2014 at 11:54 AM, Josh Hunt [email protected]
wrote:

Changing my bucket ID to one without periods fixed the issue, but I guess
this one is worth looking into...


Reply to this email directly or view it on GitHub
#26 (comment)
.

PG

from gulp-awspublish.

shedd avatar shedd commented on June 15, 2024

I also ran into this issue after changing my S3 bucket name. At first, I also suspected that it was a bucket name with periods, but it turned out that I moved from a US Standard bucket to one in US West and needed to specify the region attribute: https://github.com/LearnBoost/knox#region

from gulp-awspublish.

dknochen avatar dknochen commented on June 15, 2024

I had the same error on some machines and didn't have it on others. In the end, I narrowed the error down to the following conditions:

  • the bucket name contains periods
  • protocol is https (secure: true)
  • publish was called from an ec2 machine

the workaround in my case:

  • add config.secure = false; (i.e. use http instead of https which is no problem in my case because requests stay within the AWS network ec2->s3):
awspublish.create({
     key: key,
     secret: secret,
     bucket: bucketName,
     secure: false
});

As HTTP 301 is not really an error, I would expect awspublish to just follow the redirect?

There is a related discussion on the knox repo: Automattic/knox#66

from gulp-awspublish.

pgherveou avatar pgherveou commented on June 15, 2024

The current version of the plugin use the aws sdk so this might be outdated
as long as you can use the aws sdk and push files to S3 with it, this plugin should work too

from gulp-awspublish.

gon avatar gon commented on June 15, 2024

@shedd is right, even though S3's Region pulldown menu seems not to care about Regions it so does. My suggestion is to always specify the region option, e.g.

awspublish.create({
     key: key,
     secret: secret,
     bucket: "www.awesome.com",
     region: "us-west-1"
});

(secure: false wasn't it for me)

from gulp-awspublish.

pgherveou avatar pgherveou commented on June 15, 2024

Yep you are right could you add a note inside the readme maybe?

from gulp-awspublish.

panmanphil avatar panmanphil commented on June 15, 2024

With the current 2.0.2 version of the plugin, using a name with periods in it, required for host name mapping of an s3 bucket, a publish command fails with the 301 issue. I can use the exact same code with a bucket without a period and all is fine. I am specifying the region as shown above. I can post with the aws s3 command with no problems.

Any suggestions would be appreciated.

from gulp-awspublish.

pgherveou avatar pgherveou commented on June 15, 2024

See if this thread helps
#53

Check if you can do the following operations that the plugin does with your AWS client
https://github.com/pgherveou/gulp-awspublish/blob/master/lib/index.js#L312
https://github.com/pgherveou/gulp-awspublish/blob/master/lib/index.js#L336

from gulp-awspublish.

panmanphil avatar panmanphil commented on June 15, 2024

Gah! yes region was still the problem. I had region in there, but in the wrong place. It would really be great if the example on the README.md just had this in it from the start.

instead of:

  var publisher = awspublish.create({
    params: {
      Bucket: '...'
    }
  });

please update the README to say

  var publisher = awspublish.create({
   region: 'us-west-2',
    params: {
      Bucket: '...'
    }
  });

But thanks for the quick comment I have it working now.

from gulp-awspublish.

pgherveou avatar pgherveou commented on June 15, 2024

Cool glad it worked for u, can u send me a pull request to the readme

Sent from my iPhone

On Nov 22, 2015, at 8:07 PM, Philip Nelson [email protected] wrote:

Gah! yes region was still the problem. I had region in there, but in the wrong place. It would really be great if the example on the README.md just had this in it from the start.

instead of:

var publisher = awspublish.create({
params: {
Bucket: '...'
}
});
please update the README to say

var publisher = awspublish.create({
region: 'us-west-2',
params: {
Bucket: '...'
}
});
But thanks for the quick comment I have it working now.


Reply to this email directly or view it on GitHub.

from gulp-awspublish.

panmanphil avatar panmanphil commented on June 15, 2024

done

from gulp-awspublish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.