python boto get_contents_to_filename 和 s3 cp 的区别?

Difference between python boto get_contents_to_filename and s3 cp?

我将文件从 AWS S3 复制到我的本地文件系统。从 I/O 的角度来看,使用 get_contents_to_filenamehttp://docs.pythonboto.org/en/latest/ref/s3.html from the boto module versus the CLI aws s3 cp http://docs.aws.amazon.com/cli/latest/reference/s3/cp.html 命令本身有什么区别?一个比另一个更快还是更推荐?

aws s3 cp 在内部使用 Boto3/botocore 库但编写效率很高。从 I/O 的角度来看,对于大量文件,CLI 会更快,因为我相信它比使用 Boto3 更有效地处理缓冲 I/O。我不知道有任何 benchmark/tests 比较这些方法的效率。