Open hassankhan opened 4 years ago
@hassankhan Hey Hassan! Thanks for posting this! I think it would be great to support this in case credentials aren't passed in environment or options.
I could take this on, would love a little bit of guidance though ... the code snippet I pasted above expects to run asynchronously, however looking through the Postgres driver source, it seems that the pool is instantiated in the constructor. How would you recommend approaching this, @paveltiunov?
@hassankhan Sounds great! I believe you can instantiate it lazily when pool is accessed in query()
or testConnection()
methods. I also believe we should create separate package @cubejs-backed/redshift-driver
for this and extend PostgresDriver
there.
Is your feature request related to a problem? Please describe. The AWS Redshift SDK allows retrieving credentials via an API:
Describe the solution you'd like
It would be great if CubeJS would automatically attempt to do the above if the
CUBEJS_DB_PASS
environment variable is omitted for Redshift projects.Additional context A Serverless project using Redshift would require additional permissions to the IAM role: