s4cmd icon indicating copy to clipboard operation
s4cmd copied to clipboard

Can't GET from buckets with mixed-case names

Open ericcdub opened this issue 9 years ago • 3 comments

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

ericcdub avatar Jun 16 '15 12:06 ericcdub

+1 The same error.

Nmishin avatar Jul 28 '15 12:07 Nmishin

+1

r-vishnevsky-parc avatar Nov 02 '15 05:11 r-vishnevsky-parc

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)

salilb avatar Dec 04 '15 21:12 salilb