String jdbcUrl = "jdbc:postgresql://your-database-endpoint:your-port/your-database";
Properties properties = new Properties();
properties.setProperty("user", "your-username");
properties.setProperty("password", "your-password");
properties.setProperty("ssl", "true");
Connection connection = DriverManager.getConnection(jdbcUrl, properties);
String accessKey = "your-access-key";
String secretKey = "your-secret-key";
String jdbcUrl = "jdbc:postgresql://your-database-endpoint:your-port/your-database";
Properties properties = new Properties();
properties.setProperty("user", "your-username");
properties.setProperty("password", "your-password");
properties.setProperty("aws_access_key_id", accessKey);
properties.setProperty("aws_secret_access_key", secretKey);
Connection connection = DriverManager.getConnection(jdbcUrl, properties);
String jdbcUrl = "jdbc:postgresql://your-database-endpoint:your-port/your-database";
Properties properties = new Properties();
properties.setProperty("user", "your-username");
properties.setProperty("password", "your-password");
properties.setProperty("iam", "true");
Connection connection = DriverManager.getConnection(jdbcUrl, properties);
String jdbcUrl = "jdbc:postgresql://your-database-endpoint:your-port/your-database";
Properties properties = new Properties();
properties.setProperty("user", "your-username");
properties.setProperty("password", "your-password");
Connection connection = DriverManager.getConnection(jdbcUrl, properties);
Statement statement = connection.createStatement();
statement.execute("GRANT SELECT ON your-table TO your-user");