0

I have an Azure function which requests a signed S3 upload URL, uploads a file to the URL, calls the URL to finalise the upload, and then finally tries to generate a signed S3 download URL for the file ive just uploaded.

However, my function often (but not always) fails when trying to generate the signed S3 download URL. Sometimes it works, but most of the time it returns an error message with the following reason

{"reason":"Object not found"}

If i look at the contents of the bucket i uploaded the file to, i can confirm the file is there.

Is there a delay between finalising the upload, and being able to request a signed download for that file? If I manual step through the code it often works, and I think that's because I've given it a few seconds between finalising the upload and asking for the s3 download URL.

Is this the case? If so, what's the usual way around this? Is it simply to retry if I get that object not found error message?

jh_dempsey
  • 39
  • 3
  • 2
    S3 is [strongly consistency](https://aws.amazon.com/blogs/aws/amazon-s3-update-strong-read-after-write-consistency/), meaning the objects are always visible after they're created. That said, signing a URL doesn't actually involve S3, the signature process is 100% client side, and in fact can be done on an object that doesn't even exist. – Anon Coward Apr 05 '23 at 21:00
  • What do you mean by "calls the URL to finalise the upload"? – John Rotenstein Apr 06 '23 at 01:04
  • “calls the URL to finalise the upload” means calling this function: https://aps.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectKey-signeds3upload-POST/ – jh_dempsey Apr 06 '23 at 06:15

0 Answers0