Skip to content

PostgreSQL

Programmatic Example

CREATE DATACONNECTION psql_connection CXNPROPERTIES
(
  'connection_type'='JDBC',
  'jdbc_driver'='postgresql',
  'host'='<A cloud url or host accessible from the application>',
  'port'='<Port to connect to the DB, typically 5432>',
  'user_key'='awssm://my-username',
  'password_key'='awssm://my-password',
  'jdbc.db.name'='dev',
  'jdbc.schema.name'='public',
  'connection_properties'='{"ssl":"true","sslrootcert":"s3://rds-downloads/rds-ca-2019-root.pem"}'
);

Note

sslrootcert is required if ssl is set to true