title: How to download files from s3 given the file path using boto3 in python
body: <p>Pretty basic but I am not able to download files given s3 path.</p>
  
  <p>for eg, I have this <code>s3://name1/name2/file_name.txt</code></p>
  
  <pre><code>import boto3
  locations = ['s3://name1/name2/file_name.txt']
  s3_client = boto3.client('s3')
  bucket = 'name1'
  prefix = 'name2'
  
  for file in locations:
      s3_client.download_file(bucket, 'file_name.txt', 'my_local_folder')
  </code></pre>
  
  <p>I am getting error as <code>botocore.exceptions.ClientError: An error occurred (404) when calling the HeadObject operation: Not Found</code></p>
  
  <p>This file exists as when I download. using aws cli as <code>s3 path: s3://name1/name2/file_name.txt .</code></p>