awswrangler.emr.submit_step

awswrangler.emr.submit_step(cluster_id: str, name: str, command: str, action_on_failure: str = 'CONTINUE', script: bool = False, boto3_session: Optional[boto3.session.Session] = None) → str

Submit new job in the EMR Cluster.

Parameters
  • cluster_id (str) – Cluster ID.

  • name (str) – Step name.

  • command (str) – e.g. ‘echo “Hello!”’ e.g. for script ‘s3://…/script.sh arg1 arg2’

  • action_on_failure (str) – ‘TERMINATE_JOB_FLOW’, ‘TERMINATE_CLUSTER’, ‘CANCEL_AND_WAIT’, ‘CONTINUE’

  • script (bool) – True for raw command or False for script runner. https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-commandrunner.html

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

Returns

Step ID.

Return type

str

Examples

>>> import awswrangler as wr
>>> step_id = wr.emr.submit_step(
...     cluster_id=cluster_id,
...     name="step_test",
...     command="s3://...script.sh arg1 arg2",
...     script=True)