• Resolved tkodw

    (@tkodw)


    Hello,

    I tried to save my backups in Amazon’s S3 but I always get “ERROR: AMAZON S3 Bucket <bucket-name> does not exist“.

      My latest settings in the S3-Service tab in BackWPup:


    S3 Service: Amazon S3: EU (Germany)
    Multipart: checked
    Version: latest
    Signature: v4

      I also tried with the following settings:


    Endpoint: https://s3.eu-central-1.amazonaws.com
    Region: eu-central-1
    Version: 2006-03-01

    The credentials work, the bucket does exist and the policy on my S3 is working, too, because I tried with UpdraftPlus and it saved my backup right into the correct folder in my S3 account.

    I also tried creating a new bucket with an other user but I got the some error.

      Some information:

    WP 5.7.2
    PHP 7.4.14 (64bit)
    BackWPup 3.8.0
    curl version 7.68.0, OpenSSL/1.1.1f
    Bucket location: eu-central-1 / Frankfurt / s3.eu-central-1.amazonaws.com

    I don’t know what I could try anymore.
    Would be great if someone could help me further!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tkodw

    (@tkodw)

    Hello again,

    I’ve tried to change my settings as well as my policy in AWS S3 to some settings I’ve found across the internet and….
    IT WORKS now with BackWPup!!!

    For everyone who would like to know how I got to make it work:

    My set-up is:

    Bucket-root -> home -> specific-user-folder (AWS IAM).
    Backups are only allowed to be stored in the specific user’s folder.

    My AWS-policy for BackWpup is:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "ListBucket",
                "Effect": "Allow",
                "Action": [
                    "s3:GetBucketLocation",
                    "s3:ListBucket",
                    "s3:ListBucketMultipartUploads"
                ],
                "Resource": "arn:aws:s3:::BUCKET-NAME"
            },
            {
                "Sid": "RestrictionsForUserFolder",
                "Effect": "Allow",
                "Action": [
                    "s3:PutObject",
                    "s3:GetObject",
                    "s3:DeleteObject",
                    "s3:ListBucketMultipartUploads",
                    "s3:ListMultipartUploadParts",
                    "s3:GetBucketLocation",
                    "s3:AbortMultipartUpload"
                ],
                "Resource": [
                    "arn:aws:s3:::BUCKET-NAME/home/${aws:username}",
                    "arn:aws:s3:::BUCKET-NAME/home/${aws:username}/*"
                ]
            },
            {
                "Sid": "ListAllMyBuckets",
                "Effect": "Allow",
                "Action": "s3:ListAllMyBuckets",
                "Resource": "*"
            }
        ]
    }
    

    I would recommend to inform people in an FAQ or something like that about the permissions for BackWPup it absolutely needs to work with AWS S3.

    And some more information for the developers:
    I get the following error with PHP 7.4 as well as 8.0 when uploading to S3:

    Trying to access array offset on value of type null

    • This reply was modified 3 years, 6 months ago by tkodw.
    Plugin Support happyAnt

    (@duongcuong96)

    @tkodw
    Thank you for reporting this, yes you would need to set need policies in the AWS setting ( it’s should all work by default)
    I will contact our team about your suggestion ^^
    About the warning, It should be fixed in the next update duo to we also have to support older PHP version too.
    Thank you again for reporting!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Amazon S3: Bucket does not exist’ is closed to new replies.