我必须下载MyBucket / bucket1 / bucket1.1 / bucket1.1.2 / application.csv
答案 0 :(得分:0)
AWS Command-Line Interface (CLI)是调用AWS API命令(包括复制命令)的便捷方法:
aws s3 cp s3://MyBucket/bucket1/bucket1.1/bucket1.1.2/application.csv .
如果您希望通过boto3做到这一点:
import boto3
s3_client = boto3.client('s3', region_name='ap-southeast-2') # Adjust as necessary
response = s3_client.download_file('MyBucket', 'bucket1/bucket1.1/bucket1.1.2/application.csv', '/tmp/application.csv')