403 Forbidden when connecting to S3 bucket

Asked by Abzal

I tried many ways to launch duplicity but it always fails returning me error "403 Forbidden".

Launch params are:
duplicity full --s3-use-new-style --s3-european-buckets /usr/backups_storage/test s3+http://s3-eu-central-1.amazonaws.com/mybucket/

What I have tried:
1) To run duplicity on Freebsd 9.3 and Debian 7.7 (same error)
2) To run both on physical & virtual machines (same error). Physical machine has dedicated IPv4 address while virtual used NATed internal address
3) Changed exception handling to view full error message on line 573 of boto / s3 / connection.py (added 'raise' instead of default value bucket=none). Before doing this, I was getting non-informative error "No connection to backend" and after it became "403 Forbidden"
4) Checked and confirmed ntp is running, server time was correct on all servers.
5) Checked libssl version - using latest one
6) Run boto without duplicity . I was able to create new bucket and new file (key) in this bucket (S3 Frankfurt). This means that probably reason of the error is in duplicity, not in boto.
7) Run duplicity using a. duply b. command line c. bash script
8) Put boto config in ~/.aws/credentials and /etc/boto.cfg
9) Put duply config in ~/.duply/*profile*/conf
10) Put AWS access & secret key directly in command line, e.g. URL s3+http://AKIAIJIXSV*********:*********<email address hidden>/mybucket (mybucket is example, I created my one which was unique)
11) Created new bucket via web. --s3-european-buckets doesnt help to create new bucket via duplicity
12) Run duplicity from bash script in which I specified AWS access & secret key
export AWS_ACCESS_KEY_ID="**"
export AWS_SECRET_ACCESS_KEY="***"
13) Created different AWS power users to test different Access & Secret keys

I still cannot find solution. Please help me! Below is full error log:
root@host1:/home/abzal/duplicity # sh backup.sh
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1502, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1496, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1329, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 1059, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 952, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backend.py", line 163, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/_boto_single.py", line 163, in __init__
    self.resetConnection()
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/_boto_single.py", line 186, in resetConnection
    self.bucket = self.conn.lookup(self.bucket_name)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 571, in lookup
    bucket = self.get_bucket(bucket_name, validate, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 502, in get_bucket
    return self.head_bucket(bucket_name, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/boto/s3/connection.py", line 535, in head_bucket
    raise err
S3ResponseError: S3ResponseError: 403 Forbidden

And my duply profile conf is:
GPG_PW='*************'
TARGET='s3+http://s3-eu-central-1.amazonaws.com/mybucket/' #also tried s3.eu-central-1 instead of s3-eu-central-1
TARGET_USER='**'
TARGET_PASS='***'
SOURCE='/usr/backup_storage/test'
VERBOSITY=9

Thank you in advance!

Question information

Language:
English Edit question
Status:
Expired
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Abzal (shop-garena) said :
#1

Forgot to add:

I also tried to use s3:// instead of s3+http:// Didnt help me to

Revision history for this message
Thilo-Alexander Ginkel (thilo.ginkel) said :
#2

Have you been able to make any progress? I am currently struggling with 400 Bad Request when attempting to backup to eu-central-1.

Revision history for this message
Abzal (shop-garena) said :
#3

No progress ...

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
edso (ed.so) said :
#5

On 07.01.2015 00:11, Christian Saga wrote:
>
>
> Hi there,
> I wanted to switch to the new S3 datacenter in Frankfurt, however when
> doing so, I receive a 403 error. Similar to what was described in a
> question asked on launchpad:
> https://answers.launchpad.net/duplicity/+question/256418
>
> However no one is picking this up? Does anyone here have a solution or
> idea what to do?
>

1. does the bucket exist prior to running the backup?
2. can you try to use the latest boto?
3. what's your duplicity version?

..ede/duply.net