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
asked 6 months ago235 views
3 Answers
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
answered 6 months ago
  • 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
answered 6 months ago
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
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions