ghdna / athena-express

Athena-Express can simplify executing SQL queries in Amazon Athena AND fetching cleaned-up JSON results in the same synchronous or asynchronous request - well suited for web applications.
https://www.npmjs.com/package/athena-express
MIT License
181 stars 70 forks source link

Instantiate with credentials #57

Closed cro13 closed 3 years ago

cro13 commented 3 years ago

The library should allow passing in of IAM credentials, similar to the way AWS services in the SDK are doing it. At the moment the credentials have to be set globally, which makes it impractical if you are doing cross-accounts athena access.

ghdna commented 3 years ago

There are two options around this requirement:

  1. Explicit: Instantiate an AWS SDK object by passing in the access key/secret key as shown here
  2. Implicit: Run athena-express from any AWS host (e.g. Lambda or EC2) that already has the appropriate IAM role attached to it.