title: Scheduling one time tasks with AWS
body: <p>I have to implement functionality that requires delayed sending of a message to a user once on a specific date, which can be anytime - from tomorrow till in a few months from now.</p>
  
  <p>All our code is so far implemented as lambda functions.</p>
  
  <p>I'm considering three options on how to implement this:</p>
  
  <ol>
  <li><p>Create an entry in DynamoDB with hash key being date and range key being unique ID. Schedule lambda to run once a day and pick up all entries/tasks scheduled for this day, send a message for each of them.</p></li>
  <li><p>Using SDK Create cloudwatch event rule with cron expression indicating single execution and make it invoke lambda function (target) with ID of user/message. The lambda would be invoked on a specific schedule with a specific user/message to be delivered.</p></li>
  <li><p>Create a step function instance and configure it to sleep &amp; invoke step with logic to send a message when the right moment comes. </p></li>
  </ol>
  
  <p>Do you have perhaps any recommendation on what would be best practice to implement this kind of business requirement? Perhaps an entirely different approach?</p>