title: What is a good practice to achieve the "Exactly-once delivery" behavior with Amazon SQS?
body: <p>According to the <a href="http://aws.amazon.com/sqs/faqs/#How_does_Amazon_SQS_allow_multiple_readers_to_access_the_same_message_queue_without_losing_messages_or_processing_them_many_times" rel="noreferrer">documentation</a>:</p>
  <blockquote>
  <p>Q: How many times will I receive each message?</p>
  <p>Amazon SQS is
  engineered to provide <strong>“at least once” delivery</strong> of all messages in its
  queues. Although most of the time each message will be delivered to
  your application exactly once, you should design your system so that
  processing a message more than once does not create any errors or
  inconsistencies.</p>
  </blockquote>
  <p>Is there any good practice to achieve the exactly-once delivery?</p>
  <p>I was thinking about using the DynamoDB <a href="http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/WorkingWithDDItems.html" rel="noreferrer">“Conditional Writes”</a> as distributed locking mechanism but... any better idea?</p>
  <hr />
  <p>Some reference to this topic:</p>
  <ul>
  <li><a href="http://cloudcomputingpatterns.org/?page_id=204" rel="noreferrer">At-least-once delivery (Service Behavior)</a></li>
  <li><a href="http://cloudcomputingpatterns.org/?page_id=199" rel="noreferrer">Exactly-once delivery (Service Behavior)</a></li>
  </ul>