Search code examples
amazon-web-servicesboto3drs

AWS DRS boto3 start_recovery is not returning recovery_instance ID in response


I am working on aws drs using boto3. I have created a script, that will execute and return an output. But as per aws boto3 documentation it should also return 'recoveryInstanceID'. I am receiving everything except the recoveryInstanceID. Code for your reference:

import boto3


myclient = boto3.client('drs'

source_server = 's-32fe7############'

response = myclient.start_recovery(
    isDrill=True,
    sourceServers=[
        {
            'sourceServerID': source_server
        },
    ],
)

print(response)

As per documentation, output should be:

enter image description here

But I am getting:

enter image description here


Solution

  • It is solved. I tried by initiating a drill with boto3 start_recovery method. Then I took recovery_instance_id from describe_recovery_instances method. Which takes source server as input and returned recovery_instance_ID associated with it.