title: How to check if boto3 S3.Client.upload_fileobj succeeded?
body: <p>I want to save the result of a long running job on S3. The job is implemented in Python, so I'm using boto3. The <a href="http://boto3.readthedocs.io/en/latest/guide/s3.html#uploads" rel="noreferrer">user guide</a> says to use <a href="http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.upload_fileobj" rel="noreferrer"><code>S3.Client.upload_fileobj</code></a> for this purpose which works fine, except I can't figure out how to check if the upload has succeeded. According to the documentation, the method doesn't return anything and doesn't raise an error. The <code>Callback</code> param seems to be intended for progress tracking instead of error checking. It is also unclear if the method call is synchronous or asynchronous.</p>
  
  <p>If the upload failed for any reason, I would like to save the contents to the disk and log an error. So my question is: How can I check if a boto3 S3.Client.upload_fileobj call succeeded and do some error handling if it failed?</p>