# Backup to s3 not working

**URL:** https://discourse.roots.io/t/backup-to-s3-not-working/14090
**Category:** trellis
**Created:** 2018-11-09T15:31:06Z
**Posts:** 3

## Post 1 by @aitor — 2018-11-09T15:31:06Z

I need some additional guide for backing up to s3 with Trellis. I followed this guide:

> **[Backing Up Trellis Sites to an S3 Bucket | Roots](https://roots.io/guides/backing-up-trellis-sites-to-an-s3-bucket/)**
>
> How to back up Trellis-based WordPress sites to an S3 bucket with aws-cli and a script running on a cron job.

Backups are created succesfully in the server at `/tmp/` (in fact, in a few days these backups filled completely the storage space).

Also, a lot of “access denied” entries are created in the S3 bucket.

The config file was created at `/home/web/.aws/config` but it contents has not my aws keys in ansible config:

```
# group_vars/all/vault.yml
vault_aws_access_key_id: ********
vault_aws_secret_access_key: " ***********"
```

Instead, I have this:

```
# /home/web/.aws/config
[default]
output = json
region = ap-southeast-2
aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY
```

Should I put my keys by hand in the config file in the server side?

**UPDATE**

Editing `vendor/roles/aws-cli/defaults/main.yml`

```
aws_access_key_id: 'YOUR_ACCESS_KEY_ID'
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
```

to

```
aws_access_key_id: '{{ vault_aws_access_key_id }}'
aws_secret_access_key: '{{ vault_aws_secret_access_key }}'
```

`/home/web/.aws/config` was created with the right keys.

---

## Post 3 by @aitor — 2018-11-11T08:56:28Z

Solved here: [Backing Up Trellis Sites to an S3 Bucket](https://discourse.roots.io/t/backing-up-trellis-sites-to-an-s3-bucket/12195/5?u=aitor)
