I have packages stored in s3 bucket. I need to read metadata file of each package and pass the metadata to program. I used boto3.resource('s3') to read these files in python. The code took few minutes to run. While if I use aws cli sync, it downloads these metafiles much faster than boto. My guess was that if I do not download and just read the meta files, it should be faster. But it isn't the case. Is it safe to say that aws cli is faster than using boto? 解决方案 In my experience I have not seen CLI to be faster than boto. As helloV mentioned CLI was written by pros and is maintained at optimal levels wheras boto is written by users junior to master.If you need just metadata and want to be fast with a script using boto I highly recommend using client instead of resource and a method named head_object which does a read but not a download and metadata is retrievable in the json response structure. 这篇关于AWS CLI比使用boto3快吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-10 07:41