Giter VIP home page Giter VIP logo

Comments (7)

henrywoo avatar henrywoo commented on August 15, 2024

Hello @EloyTolosa Can you try the code in https://github.com/uber/athenadriver/tree/master/examples and see if they work? If they work, can do debug and compare the difference between your code and the example code?

from athenadriver.

EloyTolosa avatar EloyTolosa commented on August 15, 2024

Hi.
I have been looking around the code. I saw the link you provided, and I also looked around https://github.com/uber/athenadriver/blob/master/examples/auth.go which contains several authentication methods.
In the auth.go file, I cannot see any method that uses what I need.
I need the driver to use the AccessKeyID and SecretAccessKey I provide to the driver, which has all permissions to call executions to Athena.
What I can only see is that the AccessKeyID and the SecretAccessKey are dummy and do not have a purpose at all.

Am I wrong?
Is the only solution to give the Lambda function all the permissions instead of trying to pass it the credentials?

Thanks

from athenadriver.

henrywoo avatar henrywoo commented on August 15, 2024

Can you use it like this? @EloyTolosa
https://github.com/uber/athenadriver/blob/master/examples/auth.go#L31

Replace the dummy ones with your real ones.

from athenadriver.

EloyTolosa avatar EloyTolosa commented on August 15, 2024

Every time I try that method, it returns this message:
UnrecognizedClientException: The security token included in the request is invalid
I tried with fresh-new AccessKey,SecretAccessKey pair and AccessKey,SecretAccessKey pair given from Assume Role API Call using AWS SDK in Go.

What am I doing wrong? Why does it say that the token included in the request is invalid?

from athenadriver.

EloyTolosa avatar EloyTolosa commented on August 15, 2024

Hey there. I found the issue.
Whenever you try to assume a role in another account, you need to set the AwsSessionToken for your request to work.
I did that making a call to the sts.AssumeRole function and passing the session token to the config struct.

Thanks a lot for your time.

I have a suggestion. Maybe write this exact example as there are more people that I'm sure they want to assume a role in another account and have this exact problem. You could put the example in https://github.com/uber/athenadriver/blob/master/examples/auth.go, or at least explaining it in case someone needs it.

from athenadriver.

henrywoo avatar henrywoo commented on August 15, 2024

Great progress @EloyTolosa Can you please share the example code by creating a PR( you can add description in README.md or add the code in auth.go )?

from athenadriver.

EloyTolosa avatar EloyTolosa commented on August 15, 2024

Sure, I'll do it!

from athenadriver.

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.