3
votes

I have gone through the following doc which tells how to compress data before pushing into DynamoDB.

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/JavaDocumentAPIBinaryTypeExample.html

Is it possible to push data (> 1KB in size) in compressed format and rest of the data in uncompressed format into DynamoDB?

My Scenario: Push JSON string into DynamoDB

  1. Check if JSON object size is more than 1KB.
  2. If yes, compress the JSON string and update into DynamoDB
  3. If no, update the JSON string as it is into DynamoDB
1

1 Answers

2
votes

Compute the item size of your document recursively, as does the DynamoDB Storage Backend for Titan here. Then, if the item size is greater than 1kb you can choose to encode all or part of your document as a compressed binary.