Skip to content

Instantly share code, notes, and snippets.

View octopy's full-sized avatar

octo py octopy

  • octo inc
  • moscow
View GitHub Profile
@octopy
octopy / s3_multipart_upload.py
Created December 27, 2013 10:39
Example of Parallelized Multipart upload using boto
#!/usr/bin/env python
"""Split large file into multiple pieces for upload to S3.
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux
box images we need to use boto's multipart file support.
This parallelizes the task over available cores using multiprocessing.
Usage:
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>]