version works with dynamoDB, still needs to be adapted for use with the segment queue.