You can use the set_keep_job_flow_alive_when_no_steps
to configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. If you want a transient cluster that shuts down after the last of the current executing steps are completed, you can configure set_keep_job_flow_alive_when_no_steps
to false. If you want a long running cluster, configure set_keep_job_flow_alive_when_no_steps
to true.
See https://www.paws-r-sdk.com/docs/emr_set_keep_job_flow_alive_when_no_steps/ for full documentation.
emr_set_keep_job_flow_alive_when_no_steps(
JobFlowIds,
KeepJobFlowAliveWhenNoSteps
)
[required] A list of strings that uniquely identify the clusters to protect. This
identifier is returned by run_job_flow
and can
also be obtained from describe_job_flows
.
[required] A Boolean that indicates whether to terminate the cluster after all steps are executed.