Giter Club home page Giter Club logo

Comments (4)

alloveras avatar alloveras commented on June 26, 2024 2

Hello @snakelab,
as far as I know, this issue can be caused by two main reasons. See below:

  1. If you are not using profiles (see README.md), it means that you don't have the environment variables AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY configured on the shell where you are executing the aws-es-curl command.

    To check this, use something like printenv and see if they appear on the output. If they don't, just export them using the following commands:

    export AWS_ACCESS_KEY_ID=<YOUR AWS KEY ID>
    export AWS_SECRET_ACCESS_KEY=<YOUR AWS SECRET ACCESS KEY>

  2. If you are using profiles, it looks like you have something wrong on the profile configuration you are using.

Thanks,

Albert

from aws-es-curl.

jenseng avatar jenseng commented on June 26, 2024 1

It looks like this can be worked around by 1. merging your config into your credentials file, e.g.

$ cat ~/.aws/credentials
[default]
aws_access_key_id = ABCDEF...
aws_secret_access_key = s3krit...

[foo]
region = us-west-2
role_arn = arn:aws:iam::0123456789012:role/my-role
source_profile = default

and 2. inserting this code on line 36 of index.js:

  return credentials.getPromise();

I'll create a PR for the latter.

from aws-es-curl.

jenseng avatar jenseng commented on June 26, 2024

Unfortunately this can also happen if you use profiles that don't have their own credentials but instead assume a role, e.g.

$ cat ~/.aws/credentials
[default]
aws_access_key_id = ABCDEF...
aws_secret_access_key = s3krit...
$ cat ~/.aws/config
[profile default]
region = us-west-2

[profile foo]
region = us-west-2
role_arn = arn:aws:iam::0123456789012:role/my-role
source_profile = default

aws-es-curl doesn't currently supports this scenario, as there is no logic to generate and use AWS.TemporaryCredentials

from aws-es-curl.

joona avatar joona commented on June 26, 2024

@jenseng thank you for contributing! this fix is included in v1.0.8

from aws-es-curl.

Related Issues (11)

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.