Git Product home page Git Product logo

Comments (5)

pgherveou avatar pgherveou commented on August 28, 2024

Yes agree letting the error bubble up make sense to me
@mshick wrote the aws integration, what do you think?

from gulp-awspublish.

pgherveou avatar pgherveou commented on August 28, 2024

@vrivellino if things works for you without

if (opts && opts instanceof AWS.SharedIniFileCredentials && !opts.accessKeyId) {
return new gutil.PluginError({
plugin: PLUGIN_NAME,
message: 'Bad or invalid credentials'
});
}

can you make a pull request?

from gulp-awspublish.

pgherveou avatar pgherveou commented on August 28, 2024

@vrivellino did you try simply to make your code go through this condition

if (AWS.config.credentials) {

from gulp-awspublish.

vrivellino avatar vrivellino commented on August 28, 2024

@pgherveou I believe I did. I was just using some console.log() statements, but it appears the first time through the call to GetCredentials(), it fell all the way through down to line 75: return getCredentials(new AWS.SharedIniFileCredentials(opts)); And it bailed when it made the second call to GetCredentials().

I have confirmed that deleting lines 38-43 corrects this problem both on an EC2 instance with an Instance Profile, as well as my local system (where I have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set in my environment). Also, when those environment variables are not set, the AWS SDK blows everything up, as expected.

from gulp-awspublish.

vrivellino avatar vrivellino commented on August 28, 2024

@pgherveou Just to be clear, it appears AWS.config.credentials returns null on the EC2 instance. (I think this is expected behavior, too.)

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.