title: Writing a distributed queue in Amazon's DynamoDB
body: <p>I'm looking to convert a large directory of high resolution images (several million) into thumbnails using Python. I have a DynamoDB table that stores the location of each image in S3. </p>
  
  <p>Instead of processing all these images on one EC2 instance (would take weeks) I'd like to write a distributed application using a bunch of instances. </p>
  
  <p>What techniques could I use to write a queue that would allow a node to "check out" an image from the database, resize it, and update the database with the new dimensions of the generated thumbnails?</p>
  
  <p>Specifically I'm worried about atomicity and concurrency -- how can I prevent two nodes from checking out the same job at the same time with DynamoDB?</p>