title: boto3 how to create object with metadata?
body: <p>In the example below I want to set a timestamp metadata attribute when created an S3 object.  How do I do that?  The documentation is not clear.</p>
  
  <pre><code>import uuuid
  import json
  import boto3
  import botocore
  import time
  
  from boto3.session import Session
  session = Session(aws_access_key_id='XXX',
                    aws_secret_access_key='XXX')
  
  s3 = session.resource('s3')
  
  bucket = s3.Bucket('blah')
  
  for filename in glob.glob('json/*.json'):
      with open(filename, 'rb') as f:
          data = f.read().decode('utf-8')
          timestamp = str(round(time.time(),10))
          my_s3obj = s3.Object('blah', str(uuid.uuid4())).put(Body=json.dumps(data))
  </code></pre>