title: Is there a way to directly read data from s3 for model training in tensorflow
body: <p>I have tfrecords in s3 and I want to directly read those files and feed them into tensorflow training.</p>
  
  <pre><code>    filename = "s3location"
      filename_queue = tf.train.string_input_producer([filename])
      with tf.Session() as sess:
        _, value = tf.TFRecordReader().read(filename_queue)
  
        feature = {'train/image': tf.FixedLenFeature([], tf.string),
              'train/label': tf.FixedLenFeature([], tf.int64)}
  
        features = tf.parse_single_example(value, features=feature)
  
  
        image = tf.decode_raw(features['train/image'], tf.float32)
  
  
        label = tf.cast(features['train/label'], tf.int32)
  
        image = tf.reshape(image, [32, 32, 1])
  
  
        images, labels = tf.train.shuffle_batch([image, label], batch_size=50, capacity=100, num_threads=1, min_after_dequeue=10)
  </code></pre>
  
  <p>But when I am trying to feed this <code>sess.run(train, feed_dict={x:images, y: labels, hold_prob: 0.5})</code></p>
  
  <p>I get the following error - 
  <code>TypeError: The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, numpy ndarrays, or TensorHandles.</code></p>
  
  <p>I have 2 questions -</p>
  
  <ol>
  <li><p>Is there a way to read data directly from s3 in tensorflow. looks like the support was <a href="https://github.com/tensorflow/tensorflow/pull/11089/commits" rel="nofollow noreferrer">added</a> but I can't find any examples.</p></li>
  <li><p>If it is supported, is my approach correct?</p></li>
  </ol>