title: How to write a file or data to an S3 object using boto3
body: <p>In boto 2, you can write to an S3 object using these methods:</p>
  
  <ul>
  <li><a href="https://boto.readthedocs.io/en/latest/ref/s3.html#boto.s3.key.Key.set_contents_from_string" rel="noreferrer">Key.set_contents_from_string()</a></li>
  <li><a href="https://boto.readthedocs.io/en/latest/ref/s3.html#boto.s3.key.Key.set_contents_from_file" rel="noreferrer">Key.set_contents_from_file()</a></li>
  <li><a href="https://boto.readthedocs.io/en/latest/ref/s3.html#boto.s3.key.Key.set_contents_from_filename" rel="noreferrer">Key.set_contents_from_filename()</a></li>
  <li><a href="https://boto.readthedocs.io/en/latest/ref/s3.html#boto.s3.key.Key.set_contents_from_stream" rel="noreferrer">Key.set_contents_from_stream()</a></li>
  </ul>
  
  <p>Is there a boto 3 equivalent? What is the boto3 method for saving data to an object stored on S3?</p>