title: How to use asyncio to download files on s3 bucket
body: <p>I'm using the following code to download all my files in a s3 bucket:</p>
  
  <pre><code>def main(bucket_name, destination_dir):
      bucket = boto3.resource('s3').Bucket(bucket_name)
      for obj in bucket.objects.all():
          if obj.key.endswith('/'):
              continue
          destination = '%s/%s' % (bucket_name, obj.key)
          if not os.path.exists(destination):
              os.makedirs(os.path.dirname(destination), exist_ok=True)
          bucket.download_file(obj.key, destination)
  </code></pre>
  
  <p>I would like to know how to make this asynchronous, if possible.</p>
  
  <p>Thank u in advance.</p>