A Snakemake executor plugin for AWS Batch that uses pre-configured job definitions.
Project description
snakemake-executor-plugin-aws-basic-batch
A Snakemake executor plugin for AWS Batch that uses pre-configured job definitions.
For full documentation, see the Snakemake Plugin Catalog.
Unlike the standard AWS Batch plugin which dynamically creates job definitions, this "basic" plugin relies on existing job definitions. This allows all resource configuration to be managed externally (e.g., via Terraform/CloudFormation). Additionally, workflow files and dependencies must bundled in the container image.
Usage
snakemake --executor aws-basic-batch \
--aws-basic-batch-region us-east-1 \
--aws-basic-batch-job-queue my-queue \
--aws-basic-batch-job-definition my-job-def \
--aws-basic-batch-tags "project=genomics,user=alice" \
--default-storage-provider s3 \
--default-storage-prefix s3://my-bucket/workdir
Workflow-Level Tags
Apply tags to all submitted jobs (both regular and coordinator) for cost tracking, filtering, etc.:
--aws-basic-batch-tags "project=genomics,run=exp1,costcenter=research"
Tags are comma-separated key=value pairs. Can also be set via the SNAKEMAKE_AWS_BASIC_BATCH_TAGS environment variable.
Coordinator Mode
Run the entire workflow as a fire-and-forget AWS Batch job:
snakemake --executor aws-basic-batch \
--aws-basic-batch-coordinator true \
...
The coordinator job runs Snakemake itself on AWS Batch, submitting and monitoring rule jobs. Your terminal can disconnect after submission.
Optional coordinator-specific settings:
--aws-basic-batch-coordinator-queue- Job queue for the coordinator (defaults to main queue)--aws-basic-batch-coordinator-job-definition- Job definition for the coordinator (defaults to main job definition)--aws-basic-batch-coordinator-job-name-prefix- Custom prefix for coordinator job names (defaults tosnakemake-coordinator)--aws-basic-batch-coordinator-job-uuid- Custom UUID/identifier for coordinator job names (defaults to auto-generated UUID)
Per-Job Resource Customization
Override CPU, memory, queue, or job definition on a per-rule basis using Snakemake's resource system:
rule compute_heavy:
output: "result.txt"
resources:
aws_batch_vcpu=4,
aws_batch_mem_mb=8192,
aws_batch_gpu=1,
aws_batch_job_queue="high-memory-queue",
aws_batch_job_name_prefix="myproject",
aws_batch_scheduling_priority=100,
aws_batch_job_uuid="my-run-id"
shell: "python compute.py > {output}"
| Resource | Description | Default |
|---|---|---|
aws_batch_vcpu |
Number of vCPUs | 1 |
aws_batch_mem_mb |
Memory in MiB | 1024 |
aws_batch_gpu |
Number of GPUs (only included when > 0) | 0 |
aws_batch_job_queue |
Job queue ARN/name | --aws-basic-batch-job-queue |
aws_batch_job_definition |
Job definition ARN/name | --aws-basic-batch-job-definition |
aws_batch_task_timeout |
Job timeout in seconds (min: 60) | --aws-basic-batch-task-timeout |
aws_batch_job_name_prefix |
Custom prefix for job names | snakejob |
aws_batch_scheduling_priority |
Scheduling priority override for fair-share queues | None |
aws_batch_job_uuid |
Custom UUID/identifier for job names | auto-generated UUID |
These values override the base job definition's resource configuration at submission time via AWS Batch's containerOverrides.resourceRequirements.
Requirements
- Workflow and dependencies must be included in the container image
- Job definitions should have appropriate IAM roles for S3 access and Batch job submission (for coordinator mode)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snakemake_executor_plugin_aws_basic_batch-0.3.3.tar.gz.
File metadata
- Download URL: snakemake_executor_plugin_aws_basic_batch-0.3.3.tar.gz
- Upload date:
- Size: 164.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df7fa2bc0a64abf4ca9b0204c47ec84d8b1ef74283a649a32042d4a58edeee75
|
|
| MD5 |
a0beca8c7f8640843e7411660c466d47
|
|
| BLAKE2b-256 |
33857a136aaa2f6f72fd1b421f6f18676bdb2131e65c98592f94f41e68853f75
|
Provenance
The following attestation bundles were made for snakemake_executor_plugin_aws_basic_batch-0.3.3.tar.gz:
Publisher:
publish.yml on radusuciu/snakemake-executor-plugin-aws-basic-batch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snakemake_executor_plugin_aws_basic_batch-0.3.3.tar.gz -
Subject digest:
df7fa2bc0a64abf4ca9b0204c47ec84d8b1ef74283a649a32042d4a58edeee75 - Sigstore transparency entry: 1094606517
- Sigstore integration time:
-
Permalink:
radusuciu/snakemake-executor-plugin-aws-basic-batch@2df02668787359c9032ac92db25db4ade30e91df -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/radusuciu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2df02668787359c9032ac92db25db4ade30e91df -
Trigger Event:
push
-
Statement type:
File details
Details for the file snakemake_executor_plugin_aws_basic_batch-0.3.3-py3-none-any.whl.
File metadata
- Download URL: snakemake_executor_plugin_aws_basic_batch-0.3.3-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6a399ddf0b0214e115c2ffa182f3bc7afad79062da45427543ba8b3a743e0fb
|
|
| MD5 |
5256beb1c1f6afc6b82e33588cda7cca
|
|
| BLAKE2b-256 |
b5460cff8c0572eab0e4f956da0f50ef99e11750eea5d85ea3e457f0eebde4ac
|
Provenance
The following attestation bundles were made for snakemake_executor_plugin_aws_basic_batch-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on radusuciu/snakemake-executor-plugin-aws-basic-batch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snakemake_executor_plugin_aws_basic_batch-0.3.3-py3-none-any.whl -
Subject digest:
b6a399ddf0b0214e115c2ffa182f3bc7afad79062da45427543ba8b3a743e0fb - Sigstore transparency entry: 1094606570
- Sigstore integration time:
-
Permalink:
radusuciu/snakemake-executor-plugin-aws-basic-batch@2df02668787359c9032ac92db25db4ade30e91df -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/radusuciu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2df02668787359c9032ac92db25db4ade30e91df -
Trigger Event:
push
-
Statement type: