title: Locking with S3
body: <p>What's the recommended way to implement a simple locking mechanism to be used in conjunction with S3?</p>
  
  <p>Example of what I want to do:</p>
  
  <ul>
  <li>acquire lock by object id</li>
  <li>read object from S3</li>
  <li>modify data</li>
  <li>write object to S3</li>
  <li>release lock</li>
  </ul>
  
  <p>Ideally looking for a cloud based locking mechanism.  I could use memcached locally, but then I have to deal with scaling that.  I don't see an obvious way to implement lightweight locking with any AWS APIs, but it seems like a common problem.</p>
  
  <p>I wonder if you could use SimpleDB to do an atomic acquire lock operation.  Has anyone tried that? </p>