title: Detecting when all parts of an S3 multipart upload have been uploaded
body: <p>I'd like to be able to detect when all parts of an S3 multipart upload have been uploaded.</p>
  <p><strong>Context</strong></p>
  <p><a href="https://i.stack.imgur.com/6GAb5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6GAb5.png" alt="Segmented upload" /></a></p>
  <p>I'm working on a Backend application that sits between a Frontend and an S3 bucket.</p>
  <p>When the Frontend needs to upload a large file it makes a call to the Backend (step 1). The latter initiates a multipart upload in S3, generates a bunch of <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html" rel="nofollow noreferrer">presinged URLs</a>, and hands them to the Frontend (steps 2 - 5). The Frontend uploads segment data directly to S3 (steps 6, 10).</p>
  <p>S3 multipart uploads need to be explicitly completed. One obvious way to perform it would be to make another call from the Frontend to the Backend to notify about the fact that all parts have been uploaded. But if possible I'd like to avoid that extra call.</p>
  <p><strong>A possible solution: S3 Event Notifications</strong></p>
  <p>I have <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/NotificationHowTo.html" rel="nofollow noreferrer">S3 Event Notifications</a> enabled on the S3 bucket so whenever something happens, it notifies an SNS topic which in turn calls the Backend.</p>
  <p>If the bucket sent S3 notifications after each part is done uploading, I could use those in the Backend to see if it's time to complete the upload (steps 7 - 9, 11 - 14).</p>
  <p>But although some folks claim (<a href="https://stackoverflow.com/questions/72144710/s3-put-vs-multipart-notification-clarification">one</a>, <a href="https://stackoverflow.com/questions/43501378/how-to-trigger-lambda-only-one-time-for-multipart-upload-s3-triggers">two</a>) that it's the case, I wasn't able to reproduce it.</p>
  <p>For proof of concept, I used <a href="https://aws.amazon.com/premiumsupport/knowledge-center/s3-multipart-upload-cli/" rel="nofollow noreferrer">this guide from Amazon</a> to upload a file using <code>aws s3api create-multipart-upload</code>, several <code>aws s3api upload-part</code>, and <code>aws s3api complete-multipart-upload</code>. I would expect to get a notification after each <code>upload-part</code>, but I only got a single &quot;s3:ObjectCreated:CompleteMultipartUpload&quot; after, well, <code>complete-multipart-upload</code>.</p>
  <p>My bucket is configured to send notification for all object creation events: &quot;s3:ObjectCreated:*&quot;.</p>
  <p><strong>Questions</strong></p>
  <ol>
  <li>Is it possible to somehow instruct S3 to send notifications upon upload of each part?</li>
  <li>Are there any other mechanisms to find out in the Backend that all parts have been uploaded?</li>
  <li>Maybe what I want is complete nonsense and even if there was a way to implement it, it would bring significant drawbacks?</li>
  </ol>