Skip to content

Commit 19b487a

Browse files
Update prints
1 parent e8e4680 commit 19b487a

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎pgutils/connector.go‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ func NewPostgresqlConnectorFromConnectionString(connectionString string) *Postgr
9090
}
9191
}
9292

93-
//type IAMAuthConfig struct {
94-
// RDSEndpoint string
95-
// User string
96-
// Database string
97-
//}
98-
9993
type IAMAuthConfig struct {
10094
RDSEndpoint string
10195
User string
@@ -128,7 +122,7 @@ func (p *iamAuthConnectionStringProvider) getBaseConnectionString(ctx context.Co
128122
if err != nil {
129123
return "", fmt.Errorf("building auth token: %w", err)
130124
}
131-
log.Printf("Signing RDS IAM token for user: %s", p.User)
125+
log.Printf("Signing RDS IAM token for endpoint: %s user: %s", p.RDSEndpoint, p.User)
132126

133127
dsnURL := &url.URL{
134128
Scheme: "postgresql",
@@ -160,6 +154,7 @@ func NewPostgresqlConnectorWithIAMAuth(ctx context.Context, cfg *IAMAuthConfig)
160154
// If AssumeRoleARN is set, assume a role in the RDS account (Account A)
161155
// using the ECS task role creds from Account B as the source credentials.
162156
if cfg.AssumeRoleARN != "" {
157+
log.Printf("RDS IAM Assuming Role: %s", cfg.AssumeRoleARN)
163158
stsClient := sts.NewFromConfig(awsCfg)
164159

165160
sessionName := cfg.AssumeRoleSessionName

0 commit comments

Comments
 (0)