Amazon S3 presigned url - Invalidate manually or one time upload
<p>I am using S3 to accept direct uploads from the user to S3. Therefore I will be using pre-signed urls.</p>

<p>After successful upload, AWS Lambda will make sure that the file upload is an image, and then the client will tell my server that he has finished uploading.</p>

<p>Then my server will check if that file exists in S3 (if Lambda detects an invalid image, it deletes it). If it does, then the rest of the application logic will follow. </p>

<p>However, there is a loophole in this mechanism. A user can use the same url to upload a malicious file after telling my server that he has finished uploading (and initially passing a valid file).</p>

<p>Lambda will still delete the file, but now my server will think that a file exists whereas it actually does not. </p>

<p>Is there any way to generate a one-time upload pre-signed url, or is it possible to forcefully invalidate a url that was generated but has not yet expired? </p>