# IAM Role and KMS key support

**URL:** https://forums.percona.com/t/iam-role-and-kms-key-support/7503
**Category:** Percona XtraBackup
**Created:** [April 3, 2020, 4:46am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503 "2020-04-03T04:46:56Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [April 3, 2020, 4:46am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/1 "2020-04-03T04:46:56Z")

</div>

Hi guys,  
I need to backup my Percona XtraDB database from EC2 instances to S3 bucket, but bucket content needs to be&nbsp;encrypted with our own key hosted on KMS service.  
I’m running&nbsp;2.4.19 version on Ubuntu 18.04, but&nbsp;I can’t find any reference about IAM Role and KMS key support in xbcloud --help, isn’t it?  
The only confirm about IAM Role support (but not KMS key) I found is on page 12 of “Percona XtraBackup Current and Future State”&nbsp;Tyler Duzan pdf for&nbsp;FOSDEM 2020.  
  
Thanks!

---

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [April 7, 2020, 6:34am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/2 "2020-04-07T06:34:26Z")

</div>

My current workaround:  
- Install aws cli  
- Create a local system user called xtrabackup  
- Create a MySQL user called xtrabackup, auth method:&nbsp;auth\_socket  
- Backup via&nbsp;

```auto
sudo -u xtrabackup xtrabackup --user=xtrabackup --backup --stream=xbstream --galera-info --target-dir=/tmp 2&gt;/dev/null | aws s3 cp - s3://&lt;bucket&gt;/&lt;dump_db_file_name&gt; --region &lt;region&gt; --sse aws:kms --sse-kms-key-id &lt;kms_key_id&gt;

```

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [November 9, 2020, 2:24pm UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/3 "2020-11-09T14:24:42Z")

</div>

@Giovanni_Vecchi Have you looked at the xbcloud utility? It provides a more native integration to S3. I’m not sure if that solves your issue, but I was curious if you’d looked at it.

---

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [November 11, 2020, 6:40am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/4 "2020-11-11T06:40:39Z")

</div>

@matthewb as per my first post,&nbsp;IAM Role and KMS key seemed not supported at the time of writing: are there any news?  
  
Thanks

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [November 11, 2020, 11:32am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/5 "2020-11-11T11:32:35Z")

</div>

@Giovanni_Vecchi Ah, I misread your first post. If there’s nothing in the documentation then there’s no native support as far as I can tell. I found one open feature request in our JIRA, [https://jira.percona.com/browse/PXB-1882](https://jira.percona.com/browse/PXB-1882) Please feel free to add your own “I need this” to the JIRA. Our roadmap teams do indeed look at these and prioritize based on user need.

---

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [November 11, 2020, 12:16pm UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/6 "2020-11-11T12:16:54Z")

</div>

@matthewb thanks for poiting me to the jira FR, I already voted for it 😉

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [November 11, 2020, 12:20pm UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/7 "2020-11-11T12:20:51Z")

</div>

@Giovanni_Vecchi Great. Can you please mark that as answered? (Helps keep the forums clean, thanks)

---

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [November 12, 2020, 2:43am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/8 "2020-11-12T02:43:14Z")

</div>

@matthewb how to? thx

---

<div class="post-metadata">

### Author: ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)
#### Post date: [November 12, 2020, 12:36pm UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/9 "2020-11-12T12:36:02Z")

</div>

Should be a button under one of my comments either ‘Answer’ or ‘Awesome’, something like that. I can’t see it cause I’m staff.

---

<div class="post-metadata">

### Author: ![Giovanni\_Vecchi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/giovanni_vecchi/32/2415_2.png) [@Giovanni\_Vecchi](https://forums.percona.com/u/Giovanni_Vecchi)
#### Post date: [November 13, 2020, 4:49am UTC](https://forums.percona.com/t/iam-role-and-kms-key-support/7503/10 "2020-11-13T04:49:10Z")

</div>

Done
