title: AWS boto3 how to get the metadata from the key?
body: <p>I am trying to get the metadata value of the file uploaded in the s3 bucket</p>
  <p>#i have to specifically use the boto3.resource('s3') for other api call in the project.</p>
  <p>i have below data available under the metadata field</p>
  <p>#metadata</p>
  <pre><code>
  Key=Content-Type
  Value= application/json
  
  </code></pre>
  <p>below are the code</p>
  <pre><code>bucket= 'mybucket'
  key='L1/input/file.json'
  s3_resource = boto3.resource('s3')
  object = s3_resource.Object(bucket,key)
  metadata = object.metadata
  </code></pre>
  <p>but iam getting below error</p>
  <pre><code>[ERROR] ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
  </code></pre>
  <p>can anyone help me on this.</p>