RDS restore from s3

0

Hi,

Im trying to restore a mySQL 5.7 from a backup on s3. but getting error:

We're sorry, your request to create DB instance restore-test has failed.
Files from the specified Amazon S3 bucket are encrypted. Restoring from encrypted S3 object is not available

Looking at the requirments we should be meeting it, the only one im concerned by is:

The backup isnt encrypted when created. but the s3 bucket does have a custom KMS on on (That the restore IAM role has access to and specially given access in the custom key).

IF that is the problem how do you side step it now that when creating a s3 bucket it has to have encrytpion enabled (i dont see an option to create one with it turned off)

oc
已提問 6 個月前檢視次數 274 次
3 個答案
0

Hey, thanks for reaching out! It looks like your object is encrypted with KMS in addition to S3 SSE (Server Side Encryption), so you have 2 layers of encryption. Please note that S3 SSE is transparent to the user and systems consuming the API, so it's not responsible for the issue you are facing.

To make the restore work, you'll have to decrypt the backup using the KMS key before the restore process. Please have a look at the following for examples on how to do it using the s3api with the aws cli: https://repost.aws/knowledge-center/decrypt-kms-encrypted-objects-s3

AWS
Steve T
已回答 6 個月前
  • Hi,

    via the console i have done a copy files and put them in a new folder that has the default kms encrytpion removed and is set to sse-kms. I get the same error.

    Is the API doing something different this process?

0

The custom KMS key policy is likely the key and likely IAM policy/role as well. Does the key policy include grants?

You could try to side step it by using the S3 managed key instead of custom KMS and that will tell you if it is something with your key policy most likely.

Check out this: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html

This is about importing backup files but it might have some relevance.

Tom B
已回答 6 個月前
0

Hi,

via the console i have done a copy files and put them in a new folder that has the default kms encrytpion removed and is set to sse-kms. I get the same error. Is the API doing something different this process?

Image of the bucket folder the files reside attached

Enter image description here

oc
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南