Skip to content

Commit

Permalink
cluster iam
Browse files Browse the repository at this point in the history
  • Loading branch information
Divyanshu-Patel committed Oct 10, 2024
1 parent 6086d6a commit a9af3a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions soda/redshift/soda/data_sources/redshift_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ 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_with_iam(
DbName=db_name, ClusterIdentifier=cluster_name, AutoCreate=False, DurationSeconds=3600
DbName=db_name, ClusterIdentifier=cluster_name, 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 a9af3a1

Please sign in to comment.