# Problem when trying to configure S3 storage for backups

**URL:** <https://forums.percona.com/t/problem-when-trying-to-configure-s3-storage-for-backups/36293>\
**Category:** Percona Backup for MongoDB\
**Created:** [January 22, 2025, 1:36pm UTC](https://forums.percona.com/t/problem-when-trying-to-configure-s3-storage-for-backups/36293 "2025-01-22T13:36:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarekPlichta](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@MarekPlichta](https://forums.percona.com/u/MarekPlichta)\
**Post date:** [January 22, 2025, 1:36pm UTC](https://forums.percona.com/t/problem-when-trying-to-configure-s3-storage-for-backups/36293/1 "2025-01-22T13:36:05Z")

</div>

I’m trying to test saving backups to an S3 Storage, Artesca in my case, but can’t get it to work, as there is apparently a problem in my configuration file.  
I’ve tried creating a profile with storage set to S3 but upon adding the profile it always end with the following errors:

pbm profile add S3profile /mongodb/pbmbackups/pbmS3/S3profile.yaml  
Error: parse config: decode: yaml: unmarshal errors:  
line 8: field access\_key\_id not found in type s3.Config  
line 9: field secret\_access\_key not found in type s3.Config

Here is the config file:  
storage:  
type: s3  
s3:  
endpointUrl: \<correct\_endpoint\>  
bucket: \<correct\_bucket\_name\>  
region: us-east-1  
credentials:  
access\_key\_id: \<correct\_access\_key\>  
secret\_access\_key: \<correct\_secret\_key\>

Has anyone had any similar issue? I’m on version 2.7.0.  
Any help would be much appreciated.  
Thanks.

---

<div class="post-metadata">

**Author:** ![oleksandr.havryliak](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/oleksandr.havryliak/32/5703_2.png) [@oleksandr.havryliak](https://forums.percona.com/u/oleksandr.havryliak)\
**Post date:** [January 24, 2025, 1:27pm UTC](https://forums.percona.com/t/problem-when-trying-to-configure-s3-storage-for-backups/36293/2 "2025-01-24T13:27:48Z")

</div>

Hi @MarekPlichta !  
Your config has bad yaml format, please check it with yaml validator like [https://www.yamllint.com/](https://www.yamllint.com/)  
Example:

```auto
[root@rscfg01 /]# cat /etc/bad.yaml 
storage:
type: filesystem
filesystem:
path: /backups
[root@rscfg01 /]# pbm profile add filesystem /etc/bad.yaml
Error: parse config: decode: yaml: unmarshal errors:
  line 2: field type not found in type config.Config
  line 3: field filesystem not found in type config.Config
  line 4: field path not found in type config.Config
[root@rscfg01 /]# cat /etc/good.yaml 
storage:
  type: filesystem
  filesystem:
    path: /backups
[root@rscfg01 /]# pbm profile add filesystem /etc/good.yaml 
OK

```
