Restoring EFS using boto3 client does not work if EFS has already been restored once

0

Hello,

I have been playing with EFS backup and restore and using python boto3 client for all the operations. I came across an edge-case scenario where EFS restore does not work. Below are the steps (all operations were done using python boto3 client unless explicitly mentioned)

  • I created an EFS backup. I then used the recovery point ARN to restore it back to the same file system by calling start_restore_job(). This created a restore job which successfully completed and created a separate restore directory on the file system
  • I then deleted the restored directory from the file system.
  • I then called start_restore_job() again using the same recovery point ARN and to the same file system. I expected it to create a new restore job, however it failed with error "An error occurred (InvalidParameterValueException) when calling StartRestoreJob operation: Restore job xyz already finished". xyz is the same restore job that was created in the first step. Looks like it does not create a new restore job if one has already completed successfully.
  • I then ran the restore operation from the console and it did create a new restore job as expected.

I am not sure whether this is a bug with boto3 client or the API itself, but I should be allowed to run multiple restores for the same recovery point ARN.

demandé il y a 2 ans511 vues
1 réponse
0
Réponse acceptée

Reposting from Aram Koukia's comment:

Did you provide the IdempotencyToken? If you want to initiate a new Restore Job, you need to provide a new IdempotencyToken when making the API call.

https://docs.aws.amazon.com/aws-backup/latest/devguide/API_StartRestoreJob.html#API_StartRestoreJob_RequestSyntax

StartRestoreJob API documentation: https://docs.aws.amazon.com/aws-backup/latest/devguide/API_StartRestoreJob.html

AWS
répondu il y a 2 ans
  • Yes, I did not provide the IdempotencyToken. It works now after providing the token value.

    Thanks for the help

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions