Connecting to the Database
The database that holds the billing information is hosted on the same instance that the service is on, so we will need the PublicDNS. We will also need to set the database password.
Note: Make sure that the EC2 security group allows tcp port 5432 for the appropriate IP block. See Create an EC2 Security Group for more details.
We are using a PostgreSQL and the connection information is:
- database name
See Setting Up a Microsoft Windows ODBC Connection
The driver class is
org.postgresql.Driver and the jdbc url will look like
jdbc:postgresql://PublicDNS/billing. If you go to http://PublicDNS/rest/v1/connectionInfo it will give the literal jdbc url for the host.
Console - user@hostname ~ $
1 psql -h PublicDNS -U billing_viewer billing
billing_viewer_password when prompted for the password.