Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1213

S3: Region is not respected

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      When using a BlobStore configured for the 'aws-s3' provider and with an explicit region ('eu-west-1' in this case), BlobStore.createContainerInLocation(Location location, String container) fails with a 400 when attempting to create an already existing bucket on that location.

      The error message from AWS claims the cause to be AuthorizationHeaderMalformed, and says that 'eu-west-1' was expected, but that 'us-east-1' was supplied in the PUT request.

      I have confirmed that 'eu-west-1' is, in fact, given to the method call, but it does not seem to be respected when forming and signing the request.

      This does not happen on 1.9.x.

      From the debugging i have done a likely culprit seems to be Aws4SignerForAuthorizationHeader which resolves a ServiceAndRegion instance, which in turn seem to attempt parsing the region from the hostname URL (AWSHostNameUtils.parseRegionName(..)). I cannot see the region set for the provider being respected in this case.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            timuralp Timur Alperovich
            halvdanhg Halvdan Hoem Grelland
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment