How to use Prefect together with an EMR cluster on AWS?

The easiest way to run AWS EMR Spark jobs with Prefect is by leveraging the awswrangler package. Example command to submit a Pyspark job:

step_id = wr.emr.submit_step(cluster_id, 
                 command=f"spark-submit s3://{bucket}/pyspark_script.py")