s4cmd
s4cmd copied to clipboard
Can't GET from buckets with mixed-case names
Hi there,
I'm trying to do an s4cmd GET from a bucket with a mixed case name but I see the following:
"BotoClientError: Bucket names cannot contain upper-case characters when using either the sub-domain or virtual hosting calling format."
Is this a known issue or any workarounds?
Thanks
+1 The same error.
+1
In the s4cmd.py, the connect function should be re-written to handle OrdinaryCallingFormat. For example,
from boto.s3.connection import OrdinaryCallingFormat
def connect(self):
'''Connect to S3 storage'''
try:
if S3Handler.S3_KEYS:
self.s3 = boto.connect_s3(S3Handler.S3_KEYS[0],
S3Handler.S3_KEYS[1],
is_secure = self.opt.use_ssl,
suppress_consec_slashes = False,
calling_format=OrdinaryCallingFormat())
else:
self.s3 = boto.connect_s3(is_secure = self.opt.use_ssl,
suppress_consec_slashes = False,
calling_format=OrdinaryCallingFormat())
except Exception, e:
raise RetryFailure('Unable to connect to s3: %s' % e)