title: What is the difference between uploading a file to S3 using boto3.resource.put_object() and boto3.s3.transfer.upload_file()
body: <p>While I was referring to the sample codes to upload a file to S3 I found the following two ways. </p>
  
  <p><strong>Using boto3.resource.put_object():</strong></p>
  
  <pre><code>s3_resource = boto3.resource('s3')
  s3_resource.put_object(Bucket = BUCKET,  Key = 'test', Body= b'some data')
  </code></pre>
  
  <p><strong>Using boto3.s3.transfer.upload_file():</strong></p>
  
  <pre><code>client = boto3.client('s3')
  transfer = S3Transfer(client) 
  transfer.upload_file('/my_file', BUCKET, 'test') 
  </code></pre>
  
  <p>I could not figure out the difference between the two ways. Are there any advantages of using one over another in any specific use cases. Can anyone please elaborate. Thank you. </p>