code: def put_object(self, bucket, object_name, data=None, content_type=None,
                     metadata={}, amz_headers={}, body_producer=None):
          
          details = self._details(
              method=b"PUT",
              url_context=self._url_context(bucket=bucket, object_name=object_name),
              headers=self._headers(content_type),
              metadata=metadata,
              amz_headers=amz_headers,
              body=data,
              body_producer=body_producer,
          )
          d = self._submit(self._query_factory(details))
          d.addCallback(itemgetter(1))
          return d
docs: Put an object in a bucket.
  
          An existing object with the same name will be replaced.
  
          @param bucket: The name of the bucket.
          @param object_name: The name of the object.
          @type object_name: L{unicode}
          @param data: The data to write.
          @param content_type: The type of data being written.
          @param metadata: A C{dict} used to build C{x-amz-meta-*} headers.
          @param amz_headers: A C{dict} used to build C{x-amz-*} headers.
          @return: A C{Deferred} that will fire with the result of request.