shell pip install boto bash export AWS_ACCESS_KEY_ID='YOUR_ACCESS_KEY_ID' export AWS_SECRET_ACCESS_KEY='YOUR_SECRET_ACCESS_KEY' python import boto3 s3 = boto3.resource('s3') python bucket_name = 'your-bucket-name' file_name = 'path/to/file.txt' object_name = 'file.txt' s3.Bucket(bucket_name).upload_file(file_name, object_name) python bucket_name = 'your-bucket-name' object_name = 'file.txt' file_name = 'path/to/save/file.txt' s3.Bucket(bucket_name).download_file(object_name, file_name) python bucket_name = 'your-bucket-name' object_name = 'file.txt' s3.Object(bucket_name, object_name).delete()


上一篇:
下一篇:
切换中文