Duplicity e S3 Frankfurt bucket error: Por favor, use AWS4-HMAC-SHA256

0

Estou tentando fazer backup de meus arquivos via Duplicidade para o Amazon S3 - bucket na região de Frankfurt (eu-central-1).

Meu comando:

/usr/bin/duplicity \
    --exclude-if-present do-not-backup \
    --s3-use-new-style \
    --s3-use-ia \
    --sign-key 9CCF...585 \
    --encrypt-key 9CCF...585 \
    --encrypt-key 9D43...725 \
    --use-agent \
    / \
    s3+http://my-example-frankfurt-bucket/backups/

Mas a AWS retorna 400 Bad Request com o seguinte <Message> :

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

Rastreamento completo:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1553, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1547, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1382, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 166, in __init__
    self.resetConnection()
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 191, in resetConnection
    location=self.my_location)
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 625, in create_bucket
    response.status, response.reason, body)
S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>3F4...7DF7</RequestId><HostId>9nXs0JD...UeaU2WyRiw=</HostId></Error>

Versões usadas: Duplicity 0.7.11, boto 2.44.0

    
por Messa 24.04.2017 / 05:50

1 resposta

5

Consertei especificando o nome do host S3 diretamente - mesmo que não tenha certeza como exatamente está corrigindo-o:)

/usr/bin/duplicity \
    --exclude-if-present do-not-backup \
    --s3-use-new-style \
    --s3-use-ia \
    --sign-key 9CCF...585 \
    --encrypt-key 9CCF...585 \
    --encrypt-key 9D43...725 \
    --use-agent \
    / \
    s3://s3.eu-central-1.amazonaws.com/my-example-frankfurt-bucket/backups/

BTW. a lista de endpoints da AWS está aqui: link

    
por 24.04.2017 / 05:50