无法使用rdsutils.BuildAuthToken连接到RDS

I followed every step in the official documentation and used the exact same code snippet.

When I replace the authToken with a hard-coded password, then the connection will become successful.

I have assigned the User Programmatic access, but no policies.

//Yes Env vars are available
//creating new credentials from environment variables
//AWS_ACCESS_KEY_ID  and  AWS_SECRET_ACCESS_KEY
awsCreds := credentials.NewEnvCredentials()

//creating authentication token for the database connection
authToken, err := rdsutils.BuildAuthToken(dbEndpoint, awsRegion, dbUser, awsCreds)
if err != nil {
    Logger.LogFatal("Unable to build Authentication Token")
    log.Fatal("Unable to build Authentication Token")  //todo remove
}

//setting up TLS
mysql.RegisterTLSConfig("custom", &tls.Config{
    InsecureSkipVerify: true,
})

// Creating the MySQL DNS string for the DB connection
// user:password@protocol(endpoint)/dbname?<params>
dnsStr := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?tls=custom",
    dbUser, authToken, dbEndpoint,dbPort, dbName,
)
database, err = sql.Open("mysql", dnsStr)

I'm still trying to fix this. This is the error message I get:

error: ERROR: Error 1045: Access denied for user 'master'@'x.x.x.189' (using password: YES)