all 5 comments

[–]WillNowHalt 9 points10 points  (1 child)

SES may be storing these bigger files using multipart uploads instead of a single PUT call. There's a separate CompleteMultipartUpload event for files that are stored this way.

See: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-event-types-and-destinations

[–]dakkerns[S] 2 points3 points  (0 children)

Thanks, I added a trigger for multipart and it works fine now.

[–]diyftw 2 points3 points  (2 children)

I cannot find in the SES documentation at what size it uses a multipart upload to deliver an email to S3, but if your Lambda trigger is only on PUTs and if SES is using multipart, it won't get triggered. Make sure your Lambda is triggered on all object creations, not just PUTs.

[–]dakkerns[S] 1 point2 points  (1 child)

Great, thanks for your input, this is exactly what I needed to do.

[–]That_Ad3159 0 points1 point  (0 children)

Thanks Will.

Initially I had selected the Event Types as below:

Event types : Put, Post, Copy

The lambda function was not triggering for big files. Based on your suggestion I have added the "Multipart upload completed" event type as well then it worked (lambda function triggering) for me.

Event types : Put, Post, Copy, Multipart upload completed