An alternative approach that keeps the original filenames could be:

Upload file to S3 as before
S3 triggers Lambda
Lambda checks if file has already been resized by looking for an ".resized" tag on the S3 object
If tag exists, Lambda exits
If tag does not exist:

Lambda resizes the image
Lambda copies the resized image to a new S3 object with the same key (filename)
Lambda adds ".resized" tag to original S3 object

This approach stores the resized file with the same filename, and uses object tags to keep track of which files have been resized.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence