Skip to content

Commit

Permalink
with iam
Browse files Browse the repository at this point in the history
  • Loading branch information
Divyanshu-Patel committed Oct 10, 2024
1 parent 3ff0fd3 commit 6086d6a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions soda/redshift/soda/data_sources/redshift_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ def __get_cluster_credentials(self, aws_credentials: AwsCredentials):
cluster_name = self.host.split(".")[0]
username = self.dbuser if self.dbuser else self.username
db_name = self.dbname if self.dbname else self.database
cluster_creds = client.get_cluster_credentials(
DbUser=username, DbName=db_name, ClusterIdentifier=cluster_name, AutoCreate=False, DurationSeconds=3600
cluster_creds = client.get_cluster_credentials_with_iam(
DbName=db_name, ClusterIdentifier=cluster_name, AutoCreate=False, DurationSeconds=3600
)
# cluster_creds = client.get_cluster_credentials(
# DbUser=username, DbName=db_name, ClusterIdentifier=cluster_name, AutoCreate=False, DurationSeconds=3600
# )

return cluster_creds["DbUser"], cluster_creds["DbPassword"]

Expand Down

0 comments on commit 6086d6a

Please sign in to comment.