Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for (at least) London and Frankfurt regions #13

Open
tomfanning opened this issue May 31, 2017 · 3 comments
Open

Doesn't work for (at least) London and Frankfurt regions #13

tomfanning opened this issue May 31, 2017 · 3 comments

Comments

@tomfanning
Copy link

tomfanning commented May 31, 2017

With a London bucket:

[root@backup1 ~]# z3 backup --full --dry-run
Traceback (most recent call last):
  File "/usr/bin/z3", line 9, in <module>
    load_entry_point('z3==0.1.14', 'console_scripts', 'z3')()
  File "/usr/lib/python2.7/site-packages/z3/snap.py", line 562, in main
    bucket = boto.connect_s3(s3_key_id, s3_secret, **extra_config).get_bucket(bucket)
  File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 471, in get_bucket
    return self.head_bucket(bucket_name, headers=headers)
  File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 518, in head_bucket
    response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request

[root@backup1 ~]# export S3_USE_SIGV4="True"

[root@backup1 ~]# z3 backup --full --dry-run
Traceback (most recent call last):
  File "/usr/bin/z3", line 9, in <module>
    load_entry_point('z3==0.1.14', 'console_scripts', 'z3')()
  File "/usr/lib/python2.7/site-packages/z3/snap.py", line 562, in main
    bucket = boto.connect_s3(s3_key_id, s3_secret, **extra_config).get_bucket(bucket)
  File "/usr/lib/python2.7/site-packages/boto/__init__.py", line 140, in connect_s3
    return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
  File "/usr/lib/python2.7/site-packages/boto/s3/connection.py", line 196, in __init__
    "When using SigV4, you must specify a 'host' parameter."
boto.s3.connection.HostRequiredError: BotoClientError: When using SigV4, you must specify a 'host' parameter.

I believe you are suffering from this bug
boto/boto#2916
boto/boto#2741

@rciorba
Copy link
Contributor

rciorba commented May 31, 2017

@tomfanning Thanks for the bug report!

@mwpastore
Copy link

mwpastore commented Aug 16, 2018

Same with US East (Ohio). I was able to work around it by creating an inifile named .boto in the user's home directory:

[s3]
use-sigv4=True
host=s3.us-east-2.amazonaws.com

EDIT: Actually, just setting HOST= in the [main] section of z3.conf fixes it, no .boto inifile or S3_USE_SIGV4 environment variable necessary. It's like it can't figure out the endpoint address of the bucket if it uses sigv4. And I can't get the s3-accelerate endpoint to work no matter what I try.

@IronFarm
Copy link

IronFarm commented Jun 3, 2019

Thanks @mwpastore . I was passing s3.amazonaws.com as my host and adding the region fixed my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants