for more information on using IAM database authentication with RDS.
rds_build_auth_token_v2(DBHostname, Port, DBUsername, Region =NULL)
Arguments
DBHostname: [required] The hostname of the database to connect to.
Port: [required] The port number the database is listening on.
DBUsername: [required] The username to log in as.
Region: The region the database is in. If NULL, the client region will be used.
Returns
A presigned url which can be used as an auth token.
Examples
## Not run:# This example gets an authentication token for an RDS database, then# connects to the database using the token.host <-"database-1.cluster-abcdef123456.us-east-1.rds.amazonaws.com"port <-3306user <-"jane_doe"token <- svc$build_auth_token_v2( DBHostname = host, Port = port, user = user
)conn <- DBI::dbConnect( drv = RMariaDB::MariaDB(), user = user, password = token, host = host, port = port, client.flag = RMariaDB::CLIENT_SSL
)## End(Not run)