'S3 : Put Vs Multipart Notification clarification
Wanted to confirm the behavior I am seeing. I am using Amplify.Storage.uploadFile to upload a file. The file being uploaded can be of any size . Seems like the amplify sdk decides the mechanism for upload depending upon file size. I am listening to SQS notifications on upload. This is the behavior that I see
Enable only Multipart upload complete notification:
- Smaller file size : receive nothing
- Larger file size: receive single ObjectCreated:CompleteMultipartUpload event
Problem: I miss out on the smaller file.
Enable both PUT and Multipart upload complete notification
- Smaller file size: receive put event
- Larger file size : get multiple ObjectCreated:CompleteMultipartUpload events
Problem: I don’t know which of the notifications to listen to for the larger file size. I don’t know if anything is guaranteed about the timing of the multiple notification. Can I assume to try to read the file and if the multipart upload has not truly finished then I wouldn’t be able to download the file and hence I can ignore the notification ?
Thoughts ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|