fix(backend): fixed connection issue (#2125)

This commit is contained in:
Alexander 2024-04-24 13:09:24 +02:00 committed by GitHub
parent dfd2b3a6de
commit ec09a6de5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,7 @@ func (r *Redshift) Copy(tableName, fileName, delimiter string, creds, gzip bool)
if r.cfg.AWSAccessKeyID != "" && r.cfg.AWSSecretAccessKey != "" {
credentials = fmt.Sprintf(`ACCESS_KEY_ID '%s' SECRET_ACCESS_KEY '%s'`, r.cfg.AWSAccessKeyID, r.cfg.AWSSecretAccessKey)
} else if r.cfg.AWSIAMRole != "" {
credentials = fmt.Sprintf(`IAM_ROLE '%s'`, "r.cfg.AWSIAMRole")
credentials = fmt.Sprintf(`IAM_ROLE '%s'`, r.cfg.AWSIAMRole)
} else {
credentials = "IAM_ROLE default"
}