class DynamoDBSSHRecordStoreConnection implements SSHRecordStoreConnection {

    @Override
    public SSHCertRecord getSSHCertRecord(String instanceId, String service) {

        final String primaryKey = getPrimaryKey(instanceId, service);
        try {
            Item item = table.getItem(KEY_PRIMARY, primaryKey);
            if (item == null) {
                LOGGER.error("DynamoDB Get Error for {}: item not found", primaryKey);
                return null;
            }
            SSHCertRecord certRecord = new SSHCertRecord();
            certRecord.setInstanceId(instanceId);
            certRecord.setService(service);
            certRecord.setPrincipals(item.getString(KEY_PRINCIPALS));
            certRecord.setClientIP(item.getString(KEY_CLIENT_IP));
            certRecord.setPrivateIP(item.getString(KEY_PRIVATE_IP));
            return certRecord;
        } catch (Exception ex) {
            LOGGER.error("DynamoDB Get Error for {}: {}/{}", primaryKey, ex.getClass(), ex.getMessage());
            return null;
        }
    }

    public  DynamoDBSSHRecordStoreConnection(DynamoDB dynamoDB, final String tableName);

}