-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global config issue #56
Comments
@aliccer I have the same problem as I access many things on AWS from different regions. The fix would be just receiving an AWS client and then, creating new clients with the correct region as seen here: |
@phasath thank you for the response but it is not the same thing, take a look at the simple example below
So to make my S3 client to look at the production AWS profile I must explicitly pass the server config into S3 (like this |
@aliccer oh, sorry. I didn't mean it as a way to fix your problem. I forgot to break line. I believe the fix should be done on the athena-client by either accepting a new AWS client or creating a new AWS client inside the athena-client (without changing the global one). |
@phasath I forked the package and in my example removed this line https://github.com/KoteiIto/node-athena/blob/master/src/index.ts#L42 and add config into Athena and S3 instances like this
and it fixes the issue |
@aliccer I forked and changed it too to allow a overwrite flag |
I spent a lot of time trying to find a problem in my code but the problem was hidden from the eyes, and it lives on this line of code https://github.com/KoteiIto/node-athena/blob/master/src/index.ts#L42
I am using AWS STS to be able to access another AWS profile, and run a request with temporary credentials that are passed to the
createClient
function and they are set globally after the function call, and it breaks the rest of the AWS client calls (like S3, where default server settings must be used) returning in the responseAccess Denied
The text was updated successfully, but these errors were encountered: