我已經嘗試過各種嘗試來建立與S3兼容服務的連接,但我不斷收到錯誤。以下代碼將引發下面的錯誤。有任何想法嗎?Boto region_name missing
import os
import boto
import boto.s3.connection
from boto.s3.key import Key
try:
conn = boto.s3.connect_to_region(region = 'nil',
aws_access_key_id = 'xx',
aws_secret_access_key = 'xx',
host = 'ds41s3-scs.xx.com',
calling_format = boto.s3.connection.OrdinaryCallingFormat(),
)
response = s3.list_buckets()
except Exception,e:
print str(e)
print "error"
錯誤:
TypeError: connect_to_region() missing 1 required positional argument: 'region_name'
你可能也想看看客戶設計的S3兼容的服務,如:https://github.com/ minio/minio-py –