I followed the exporting to S3 approach.
Unfortunately it takes a while until those files become available, even though the AWS API says they are.
We had many issues with this approach in the past. Better host the response yourself....
This can be quite annoying if you have e.g. a separate process polling for an S3 object. The object can appear in a HEAD and then return a 404 on the subsequent GET.
You might also have better luck using the region-specific S3 endpoint rather than the global domain name.
And no - haven't contacted support so far. Will assign someone from my team to get in touch with them.
def is_file_uploaded(file_name, request_id):
for i in range(S3_UPLOAD_ATTEMPTS_COUNT):
try:
s3.Object(BUCKET, file_name).load()
return True
except botocore.exceptions.ClientError as e:
logger.warning('File still not uploaded to S3.
Check - {}/{} (request_id - {})'.format(
i+1, S3_UPLOAD_ATTEMPTS_COUNT, request_id
))
return False