private void run() throws IOException { InputStream resourceAsStream = getClass().getResourceAsStream("/AwsCredentials.properties"); assert resourceAsStream != null; AWSCredentials credentials = new PropertiesCredentials(resourceAsStream); AmazonDynamoDBClient amazonDynamoDBClient = new AmazonDynamoDBClient(credentials); amazonDynamoDBClient.setEndpoint("https://dynamodb.us-west-1.amazonaws.com"); String tableName = "wellsfargo-checking-01"; // String tableName = "table3"; // describeTable(amazonDynamoDBClient, tableName); List<String> strings = FileUtils.readLines(new File("data/subset.txt")); int i = 0; for (String record : strings) { // 1 1/2/00 Opening Balance - 3504.65 X - [WF Checking] String[] ledgerEntry = record.split("\\t"); Map<String, AttributeValue> item = new HashMap<String, AttributeValue>(); AttributeValue txidAttribute = new AttributeValue(); txidAttribute.setN(ledgerEntry[0]); item.put("txid", txidAttribute); item.put("date", new AttributeValue(ledgerEntry[1])); item.put("payee", new AttributeValue(ledgerEntry[2])); item.put("memo", new AttributeValue(ledgerEntry[3])); item.put("amount", new AttributeValue(ledgerEntry[4])); item.put("cleared", new AttributeValue(ledgerEntry[5])); item.put("checknumber", new AttributeValue(ledgerEntry[6])); item.put("category", new AttributeValue(ledgerEntry[7])); PutItemRequest putItemRequest = new PutItemRequest(tableName, item); PutItemResult putItemResult = amazonDynamoDBClient.putItem(putItemRequest); if (++i % 10 == 0) { System.out.println("putItemResult: " + putItemResult); } } }