Skip to content

Commit 6dfef20

Browse files
authored
fix(athena-driver): accept AWS assume role parameters as part of the (#10300)
config
1 parent 69525f9 commit 6dfef20

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/cubejs-athena-driver/src/AthenaDriver.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ interface AthenaDriverOptions extends AthenaClientConfig {
5151
exportBucket?: string
5252
pollTimeout?: number
5353
pollMaxInterval?: number
54+
athenaAwsAssumeRoleArn?: string
55+
athenaAwsAssumeRoleExternalId?: string
5456

5557
/**
5658
* The export bucket CSV file escape symbol.
@@ -125,8 +127,13 @@ export class AthenaDriver extends BaseDriver implements DriverInterface {
125127
config.secretAccessKey ||
126128
getEnv('athenaAwsSecret', { dataSource });
127129

128-
const assumeRoleArn = getEnv('athenaAwsAssumeRoleArn', { dataSource });
129-
const assumeRoleExternalId = getEnv('athenaAwsAssumeRoleExternalId', { dataSource });
130+
const assumeRoleArn =
131+
config.athenaAwsAssumeRoleArn ||
132+
getEnv('athenaAwsAssumeRoleArn', { dataSource });
133+
134+
const assumeRoleExternalId =
135+
config.athenaAwsAssumeRoleExternalId ||
136+
getEnv('athenaAwsAssumeRoleExternalId', { dataSource });
130137

131138
const { schema, ...restConfig } = config;
132139

0 commit comments

Comments
 (0)