Yeah, I just deleted my post because I wasn't paying attention to the "s3" part. Sorry.
You might be able to use the attachment_complete hook to know when the upload has completed, then build your script to run then.
The file path is built with the assigned directory, userid and filedataid.
So, if you're assigned directory is: uploads and the userid is 21 and the filedataid is 897 the full path would be /uploads/2/1/897.attach
The actual filename is stored in the database.