Hello. I built a small local database in Postgres and use some perl scripts to load and update data, and then to extract for some reports. My scripts use the standard DBI module:
use DBI; $dbh = DBI->connect("dbi:Pg:dbname=mydb;host=localhost;port=5432;", $username, $password, {AutoCommit => 0, RaiseError => 1, PrintError => 0 +} );
Now, I have to move my local database model to an AmazonAWS Postgres database, which it is using an SSL tunnel (a second hostname and port). Also, as my localhost is outside of the HQ, I had to connect my box to there using a VPN in order to be able to access AWS.
I was given some credentials and a PEM file, so I can connect to that database server using the pgAdmin tool, but I cannot figure out how to implement that kind of connection in my scripts. I'm not sure if the sslmode connect string option is useful in this case...
Any idea on how to configure the connect string? Should I use another module as a wrapper?
Thanks...
In reply to Connecting to a database in AWS using SSL by vitoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |