title: When the object-created event is triggered in AWS?
body: <p>Need to work with large files uploads to a bucket (S3), using Lambda function triggered with the <code>object-created</code> event to start processing it <strong><em>after is completed</em></strong></p>
  
  <p>Upload call from a client in java:</p>
  
  <p><code>transferUtility.upload("folder", file.getName(), file);</code></p>
  
  <p>(a <code>TransferObserver</code> type)</p>
  
  <p>But looking into the documentation <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html</a> can't find explicitly when the event is trigger.</p>
  
  <p>The past tense suggest is after all is up, but does anyone knows it for sure or know where to find those details.</p>
  
  <hr>
  
  <p>Observing more in detail logs inserted from <code>console.log()</code> in CloudWatch, there are two entries one with:
  <code>
  {
     "key": "testing-dev/test150.mp4",
     "size": 0,
     "eTag": "d41d8cd98f00b204e9800998ecf8427e",
     "sequencer": "005B16EEECE6C6C90D"
  }</code>
  and the other with:
  <code>
  {
     "key": "testing-dev/test150.mp4",
     "size": 432351,
     "eTag": "05d53b99cba51a1f5c79532fb4effe40",
     "sequencer": "005B16EEECEF2AA80F"
  }
  </code>
  for the <code>object</code> element in the event variable:
  <code>event.Records[0].s3.object</code></p>
  
  <p>Note the <code>"size": 0</code> in the first entry</p>