Cloning existing EMR cluster into a new one using boto3


When creating a new cluster using boto3, I want to use configuration from existing clusters (which is terminated) and thus clone it.
As far as I know, emr_client.run_job_flow requires all the configuration(Instances, InstanceFleets etc) to be provided as parameters.
Is there any way I can clone from existing cluster like I can do from aws console for EMR.

enter image description here


What i can recommend you, is using the AWS CLI to fire your Cluster.
It permit to versioning your cluster configuration and you can easily load steps configuration with a json file.

Where step.json looks like :

(Multiple steps is okey too)

After that you can always startUp the same configured Cluster.
And for example Schedule the whole Cluster and steps from one AirFlow job.

But if you really want to use Boto3, i suppose that the describe_cluster() method can help you to get the whole informations and use the returned object to Fire Up a new one.

Leave a Reply