acoustic-carpenter-78188
07/09/2026, 6:54 AMflytekitplugins-awsemrserverless, that lets Flyte tasks run Spark and Hive jobs on AWS EMR Serverless via an async connector. It tracks issue #7286 (flyteorg/flyte).
The plugin supports three task modes:
• Pythonic Spark: a regular @task whose body is PySpark. The connector packages the user code, uploads it to S3, and submits an EMR Serverless job that executes it on the worker image. No long-lived cluster.
• Script Spark: point at an existing s3://.../main.py (or JAR) and submit it directly.
• Hive: submit a Hive query (inline or staged in S3) against a Hive-configured EMR Serverless application.
The connector implements the standard create / get / delete lifecycle on top of StartJobRun / GetJobRun / CancelJobRun, maps EMR Serverless states to Flyte task phases, and surfaces log URIs to the Flyte UI when available. It is intended to run on the existing upstream flyteconnector pod with this package installed and an IAM identity allowed to call EMR Serverless. No changes to the flyteconnector Helm chart are required for adopters.
Layout
The plugin follows the existing flytekit-aws-batch / flytekit-aws-sagemaker conventions:
plugins/flytekit-aws-emr-serverless/
├── README.md
├── setup.py # PyPI: flytekitplugins-awsemrserverless
├── flytekitplugins/
│ └── awsemrserverless/
│ ├── __init__.py
│ ├── connector.py # EMRServerlessConnector (async)
│ ├── task.py # EMRServerless task config + drivers
│ ├── boto_handler.py # boto3/aioboto3 calls + retry
│ └── _entrypoint.py # worker-side bootstrap for Pythonic mode
└── tests/ # 138 unit tests
PyPI/module naming mirrors flytekitplugins-awsbatch and flytekitplugins-awssagemaker.
Why this fits in flytekit
• It is a connector, not a runtime, so no changes are required on the propeller side.
• It reuses AsyncConnectorBase, ResourceMeta, TaskLog, ConnectorRegistry, and convert_to_flyte_phase exactly as Databricks, BigQuery, Snowflake, and SageMaker do.
• The plugin layout, setup.py, and entry_points registration match the existing AWS-family plugins.
Test plan
• 138 unit tests pass locally under pytest covering the connector lifecycle, task config, boto handler, and worker entrypoint.
• Verified the plugin installs cleanly via pip install -e . and registers the entry point.
• Ran a smoke pythonic-Spark workflow end-to-end against a real EMR Serverless application using a flyteconnector-deployed pod with this package installed.
• CI on this PR.
Notes for reviewers
• Happy to split this into multiple commits, rename anything, or move pieces around to match maintainer preferences.
• The README documents IAM requirements for the connector's IAM identity and the EMR Serverless execution role.
• Open questions called out in #7286 (worker-image distribution story, log fetching scope) are intentionally not addressed here. They can land as follow-ups so this PR stays scoped to the connector itself.
/cc @machichima @freezing-airport-6809 @pingsutw
flyteorg/flytekitacoustic-carpenter-78188
07/09/2026, 6:54 AM