title: Access denied error when curl'ing S3 object from pre-signed url
body: <p>This is the script which I wrote for downloading object from S3 via a pre-signed url:</p>
  
  <pre><code>import boto3
  import os
  
  
  AWS_ACCESS_KEY_ID = '&lt;&gt;'
  AWS_SECRET_ACCESS_KEY = '&lt;&gt;'
  region = '&lt;&gt;'
  
  session = boto3.Session(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, region_name = region)
  s3 = session.client('s3')
  url = s3.generate_presigned_url('get_object', Params = {'Bucket': '&lt;&gt;', 'Key': '&lt;&gt;.json'}, ExpiresIn = 100)
  
  print url
  
  os.system('curl ' + url)
  </code></pre>
  
  <p>From this, I am able to get the url, but the <code>os.system</code> command is giving me the following error: </p>
  
  <pre><code>&lt;Error&gt;&lt;Code&gt;AccessDenied&lt;/Code&gt;&lt;Message&gt;Access Denied&lt;/Message&gt;&lt;RequestId&gt;...&lt;/RequestId&gt;&lt;HostId&gt;...&lt;/HostId&gt;&lt;/Error&gt;
  </code></pre>
  
  <p>But, when I directly try the url in my browser, it is downloading the file.</p>
  
  <p><strong>So, what did I do wrong here?</strong> How do I download the file via the Python script?</p>