aws emr set-keep-job-flow-alive-when-no-steps
You can use the SetKeepJobFlowAliveWhenNoSteps to configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. AWS CLI reference
2 options Its page in the AWS CLI reference
Options
--cluster-idsA list of strings that uniquely identify the clusters to protect.--keep-job-flow-alive-when-no-stepsA Boolean that indicates whether to terminate the cluster after all steps are executed.