title: get file metadata from S3 using Python boto
body: <p>I have some binary files in <code>AWS S3</code>, i need to get the <code>file metadata</code> like <code>created time</code>, <code>modified time</code> and accessed time using Python Boto API?</p>
  
  <p>What we tried was copy the files to EC2 instance, from there we used <code>os</code> module <code>stat</code> method to get the times. I hope when we copy the files to EC2 instance these details are changed.</p>
  
  <p>Sample code what i tried:</p>
  
  <pre><code>stat = os.stat(inputFile)
  createdTime = datetime.fromtimestamp(stat[9]).strftime("%A, %B %d, %Y %I:%M:%S")
  </code></pre>
  
  <p>How to directly get these details from S3?</p>