in src/main/java/com/amazon/neptune/gremlin/driver/example/NeptuneGremlinSigV4Example.java [77:101]
public static void main(final String[] args) {
final Options options = setupCliOptions();
final CommandLine cli = parseArgs(args, options);
final Cluster.Builder builder = Cluster.build();
builder.addContactPoint(cli.getOptionValue(ENDPOINT));
builder.port(Integer.parseInt(cli.getOptionValue(PORT)));
//If the neptune db is auth enabled then add use the following channelizer. Otherwise omit the below line.
builder.channelizer(SigV4WebSocketChannelizer.class);
builder.enableSsl(Boolean.parseBoolean(cli.getOptionValue(SSL, "false")));
final Cluster cluster = builder.create();
try {
final Client client = cluster.connect();
final ResultSet rs = client.submit(SAMPLE_QUERY);
for (Result r : rs) {
System.out.println(r);
}
} finally {
cluster.close();
}
}