title: Entering a binary in DynamoDB from a string
body: <p>I'm trying to enter values into DynamoDB from a JSON string and one of those values is a binary. For example, binaryString = 'AAAcd'. I want 'AAAcd' to be the binary in the DynamoDB entry, but when I convert the string to a binary and put it into an item, the value has been changed due to the encoding. For example, the item in DynamoDB will be 'Qha=e' How can I get the binary value in DynamoDB to be 'AAAcd'? </p>
  
  <pre><code>    String binary = "AAAcd";
      byte[] bytes = binary.getBytes();
      Item item = new Item();
      item.withBinary("binary_col", bytes);
  </code></pre>
  
  <p>With the above, the value under "binary_col" is not "AAAcd", but "Qha=e".</p>