I use AWS Transfer for SFTP service and ran into an issue with multipart upload and numerious S3 events triger my Lambda for every uploaded file part. I'd like to disable all of these events and receive only one single event after full file upload. How to achieve it?
UPDATED
We have created the following matrix that displays results of our testing file upload through AWS Transfer for SFTP(which in my understanding is a sync between SFTP and S3):
PUT, POST, COPY, Multipart upload completed, All object create events - means AWS S3 events we have tested
Y - means, event was triggered
N - event was not trigered
When we try to upload a little bit larger file(~4MB) we receive 2 notifications with different AWS Request IDs and different s3_object_key: filename.txt
and filename.txt.filepart
.
It wasn’t an AWS issue; it was actually related to how the WinSCP client uploads data. It breaks down large files into smaller chunks and uploads them individually. As a result, S3 sees each chunk as a separate file (which they effectively are at that point), which is why I received those events.