amazon region is not being picked up correctly when creating a s3 bucket

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • master, 5.1.0, 5.0.9
    • Affects Version/s: master, 5.0.8
    • Component/s: CLI: pegasus-s3
    • None

      It seems like pegasus-s3 does not create a bucket in a region other than us-east-1

      In my credentials.conf I have 

       

      [amazon]
      endpoint = http://s3.amazonaws.com/
      region = us-east-2
      

       

      However, when I use pegasus-s3 with the above credentials file the bucket still gets created in us-east-1. 
      truncated pegasus-s3 debug log below

       

      pegasus-s3 -d mkdir s3://bamboo@amazon/vahi-test
      ..
      2024-09-25 10:42:12,508:DEBUG:botocore.hooks(238): Event before-call.s3.HeadBucket: calling handler <function inject_api_version_header_if_needed at 0x7fa9fd811620>
      2024-09-25 10:42:12,508:DEBUG:botocore.endpoint(114): Making request for OperationModel(name=HeadBucket) with params: {'url_path': '/vahi-test', 'query_string': {}, 'method': 'HEAD', 'headers': {'User-Agent': 'Boto3/1.23.10 Python/3.6.8 Linux/4.18.0-553.16.1.el8_10.x86_64 Botocore/1.26.10'}, 'body': b'', 'url': 'http://s3.amazonaws.com/vahi-test', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7fa9fd302358>, 'has_streaming_input': False, 'auth_type': None, 'signing': {'bucket': 'vahi-test'}}}
      ...
      024-09-25 10:42:12,900:DEBUG:botocore.parsers(239): Response headers: {'x-amz-id-2': 'zMRPoQFzhTfuqZPWXZhhus+AxlXZHsVeuJh8SQVmzqLPkskth9Y5OTX4F3zWAkasKGHRCz+JM3Dv1ho4931LsmBk+PjT8jAN', 'x-amz-request-id': 'D5TP5E9MQNPZB9BC', 'Date': 'Wed, 25 Sep 2024 17:42:13 GMT', 'Location': '/vahi-test', 'Server': 'AmazonS3', 'Content-Length': '0'}
      2024-09-25 10:42:12,900:DEBUG:botocore.parsers(240): Response body:
      b''
      2024-09-25 10:42:12,900:DEBUG:botocore.hooks(238): Event needs-retry.s3.CreateBucket: calling handler <botocore.retryhandler.RetryHandler object at 0x7fa9fd214eb8>
      2024-09-25 10:42:12,900:DEBUG:botocore.retryhandler(211): No retry needed.
      2024-09-25 10:42:12,900:DEBUG:botocore.hooks(238): Event needs-retry.s3.CreateBucket: calling handler <bound method S3RegionRedirector.redirect_from_error of <botocore.utils.S3RegionRedirector object at 0x7fa9fd214fd0>>
       
      

       

      The s3 web ui also confirms buckets gets created in us-east-1

            Assignee:
            Mats Rynge
            Reporter:
            Karan Vahi
            Watchers:
            1 Start watching this issue

              Created:
              Updated: