title: S3 File Download Returns Error
body: <p>I wrote the following Python script to download <strong>ALL</strong> files within an S3 Bucket into my current directory:</p>
  
  <pre><code>import boto3
  import botocore
  import os
  
  from boto3.session import Session
  
  ACCESS_KEY='AWS_IAM_AccessKey'
  SECRET_KEY='AWS_IAM_SecretKey'
  
  session = Session(aws_access_key_id=ACCESS_KEY, 
  aws_secret_access_key=SECRET_KEY)
  
  s3 = session.resource('s3')
  myBucket = s3.Bucket('S3_bucketName')
  
  for object in myBucket.objects.all():
      myBucket.download_file(object.key, os.path.join(os.curdir, object.key))
  </code></pre>
  
  <p>I am receiving the following error: </p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: './raw_cdr/s3_fileName'
  </code></pre>
  
  <p>How can I fix this? Despite the fact that the s3_fileName is in fact an actual file within the raw_cdr directory, its saying that no such file/directory exists (and it only finds that one file amongst several). </p>
  
  <p>Also, as the S3 bucket size grows, I'd like to further enhance this script to only pull down S3 files generated within the last 24 hours (using the Last Modified column value) as opposed to all of them. Any and all suggestions are much appreciated.  </p>