title: Using AWS for application logging database
body: <p>I'm currently working on a large web application that produces a large amount of log data. Because we don't have the infrastructure to log all the events to a database, we are writing them to file. Unfortunately, this makes it very difficult to search the logs for a specific event and impossible to generate reports on frequency.</p>
  
  <p>While trying to figure out how to implement better database logging, I found Amazon's services. Specifically <a href="http://aws.amazon.com/simpledb/" rel="nofollow noreferrer">SimpleDB</a> and <a href="http://aws.amazon.com/dynamodb/" rel="nofollow noreferrer">DynamoDB</a>. One of the use cases for SimpleDB was <a href="http://aws.amazon.com/simpledb/usecases_logging/" rel="nofollow noreferrer">logging</a>, but then later it states that </p>
  
  <blockquote>
    <p>Amazon SimpleDB is designed to store relatively small amounts of data...</p>
  </blockquote>
  
  <p>This seems contradictory. Here are my questions:</p>
  
  <ol>
  <li>Would these database services be suitable for logging application events?</li>
  <li>Would the be suitable for generating reports from log data?</li>
  <li>Would I use a Timestamp as my primary key?</li>
  <li>Are there drawbacks to this sort of service or something else I should consider?</li>
  </ol>
  
  <p><strong>Update 2018-06-13:</strong> I have since used SimpleDB to log application data on large applications. The key was to partition the logs into domains corresponding to the time period they were generated (daily for example) to ensure they didn't grow beyond their limit. Then set up a CRON job to periodically delete the old domains. This solution has worked well and is easily searchable.</p>