# \[SOLVED\] S3 Backup fails to backup

**URL:** <https://discourse.mailinabox.email/t/solved-s3-backup-fails-to-backup/5449>\
**Category:** Help with Setup/Upgrade\
**Created:** [September 21, 2019, 3:14pm UTC](https://discourse.mailinabox.email/t/solved-s3-backup-fails-to-backup/5449 "2019-09-21T15:14:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Netwerked](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/n/ecae2f/32.png) [@Netwerked](https://discourse.mailinabox.email/u/Netwerked)\
**Post date:** [September 21, 2019, 3:14pm UTC](https://discourse.mailinabox.email/t/solved-s3-backup-fails-to-backup/5449/1 "2019-09-21T15:14:52Z")

</div>

PROBLEM:

- There is not much documentation on how to configure Amazon Web Services to receive S3 backups from MIAB. You might have followed the tutorial at [http://www.meanly.io/aws/2017/09/22/storing-mail-in-a-box-backups-in-s3.html](http://www.meanly.io/aws/2017/09/22/storing-mail-in-a-box-backups-in-s3.html).

- Your backups are running, but you receive nightly emails with the following error messages:

- Your backups are running, but it takes 4-5 minutes to transfer 250MB to your S3 bucket due to attempts failing.

- When it is time for the first full backup to be deleted, backups stop working altogether and you receive the following error message:

ROOT CAUSE ANALYSIS:

The tutorial is a bit out of date. Apparently, MIAB didn’t rotate backups in 2017, so there was no need to grant the GetObject and DeleteObject permissions to items within the bucket.

SOLUTION:  
Make sure that the group that the MIAB AWS user belongs to has at least the following permissions:

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::my-bucket-name"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": "arn:aws:s3:::my-bucket-name/*"
        }
    ]
}
```

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [September 28, 2019, 3:14pm UTC](https://discourse.mailinabox.email/t/solved-s3-backup-fails-to-backup/5449/2 "2019-09-28T15:14:54Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
