Database connection API
Use ini file to define database connections. The first block in the example below connect directly to the database, while the second block uses ssh tunnel to connect to database host. The third example retrieves database connection credentials from AWS Secrets Manager.
For details, see Managing databases connections
[mimic]
host=localhost
database=mimicii
user=postgres
password=*****
[nsaph2]
host=dorieh.platform.cluster.uni.edu
database=nsaph
user=dbuser
password=*********
ssh_user=johndoe
[dorieh]
database=dorieh
secret=aws:region=us-east-1:name=nsaph/public/dorieh/
API to establish database connection
Connection details and credentials are specified in database.ini file
This module supports connecting via ssh tunnel. This happens automatically if the given section of database.ini contains ssh_user key.