Subchapter 37.103
references/processing-jobs/overview.mdMarkdown7 KBView on GitHub
Run arbitrary scripts and distributed data workloads on SageMaker managed processing compute with SageMaker Python SDK v3. Covers plain scripts, framework environments, Spark, custom containers, Athena/Redshift dataset definitions, and failure diagnosis.
Use this capability when the user asks to:
Dataset format conversion that is already covered by dataset-transformation stays there; that capability may call SageMaker Processing internally.
| Area | Assumption |
|---|---|
| Runtime | Python supported by sagemaker>=3.22.0,<4.0; templates install dependencies at use time |
| Credentials | Ambient AWS credentials plus a SageMaker execution role; caller needs processing create/describe, S3, logs, ECR/DLC, iam:PassRole, and Athena/Redshift permissions when selected |
| Storage | Small scripts/configs may be local; processor uploads code and stages data through S3; container paths live under /opt/ml/processing/ |
| Region | Resolve from the AWS session; processing images and S3 query/output locations must be usable in that region |
| Network | PyPI access is needed for installation; runtime egress depends on the selected container and VPC/network isolation settings |
code_templates/script_processing.pycode_templates/framework_processing.pycode_templates/spark_processing.pycode_templates/dataset_definition_processing.pyreferences/troubleshooting.mdimage_uris.retrieve when it fits. Follow the managed-image resolution and reproducibility rules in references/configuration.md; review the resolved URI before launch.aws ecr describe-images procedure in references/configuration.md, present candidate tags/digests and timestamps, obtain user selection, and pin the selected digest. Never silently select a mutable latest tag.Use cascading fallback: conversation → project files → ask one unresolved question at a time.
Required for launch: script/app or image, role, instance type/count, max runtime, input/output mapping, and wait behavior. Additionally:
requirements.txtreferences/configuration.md.For a Spark JAR, infer the fully qualified main class from the JAR manifest, build file (pom.xml, build.sbt, Gradle), or application documentation. Ask the user if it remains unresolved. SPARK_MAIN_CLASS is required only for APPLICATION_KIND="jar"; clear it for PySpark.
GPU-backed Processing Jobs are supported only with a GPU processing instance, compatible CUDA/framework or BYOC image, and sufficient regional quota. This reference has not validated a dedicated GPU-processing branch, so state that limitation and verify image compatibility/quota rather than assuming a CPU image will work.
Before generating code or submitting a job:
/opt/ml/processing/, because SageMaker Processing mounts input channels and collects declared outputs under that container path; paths outside it are not automatically populated or uploaded.references/configuration.md and the selected template.WAIT_FOR_COMPLETION=False unless the user asks to block.wait=False, print job name/ARN immediately, and use logs_for_processing_job only when waiting.Read references/troubleshooting.md. Start with DescribeProcessingJob, then inspect the job’s CloudWatch stream. Return failure signature, root cause category, evidence, and fix; state what was not checked.
The following are supported by SageMaker and AWS but do not have a validated workflow in this reference. If the user’s request matches one of these, let them know and proceed with best-effort guidance using general AWS knowledge:
code_templates/script_processing.py — plain script and BYOCcode_templates/framework_processing.py — framework image, source directory, requirementscode_templates/spark_processing.py — PySpark or Spark JARcode_templates/dataset_definition_processing.py — Athena or Redshift query inputreferences/configuration.md — placeholders and branch settingsreferences/troubleshooting.md — status and failure classification