aws-cdk.aws-batch
The CDK Construct Library for AWS::Batch
What it is and what it does
This package provides AWS CDK v1 constructs for defining AWS Batch infrastructure in Python code. It lets you declare compute environments (managed or unmanaged, supporting EC2, Spot, and Fargate), job queues with priority-based scheduling, and job definitions—all the core resources needed to run batch workloads on AWS. The package wraps AWS Batch's queue-based job processing model, allowing you to specify resource requirements, container images, environment variables, and allocation strategies programmatically.
However, AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated. New projects should use AWS CDK v2 instead. Existing projects using this package will continue to work but will not receive bug fixes, security updates, or new features. The package depends on 11 runtime libraries including aws-cdk.aws-ec2, aws-cdk.aws-ecs, aws-cdk.aws-iam, and the core CDK framework.
Use it for:
- Define managed compute environments that auto-scale EC2 or Fargate resources based on batch job demand.
- Create job queues with priority-based scheduling to handle high-priority jobs before lower-priority ones.
- Specify job definitions with container images, vCPU/memory requirements, and environment variables as infrastructure code.
- Configure spot-based compute environments to reduce costs by bidding for EC2 Spot instances at a percentage of on-demand pricing.
- Import and reference existing AWS Batch resources (compute environments, queues) into CDK stacks for hybrid infrastructure management.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Defines AWS Batch infrastructure (compute environments, job queues, and job definitions) as Python code using AWS CDK v1 constructs.
No—do not install for new projects. AWS CDK v1 is end-of-support as of 2023-06-01 and receives no updates. Use AWS CDK v2's batch constructs instead. For existing CDK v1 projects already in production, this package will continue to work but should be migrated to v2 on a planned schedule to maintain security and feature parity.
Install
aws-cdk-aws-batch on PyPI
pip
pip install aws-cdk-aws-batchuv
uv add aws-cdk-aws-batchpoetry
poetry add aws-cdk-aws-batchInstalling aws-cdk.aws-batch
Before you install
Low install friction with pure Python wheel distribution. Maintenance status is active, but the package is classified as Inactive (Development Status 7) because AWS CDK v1 reached end-of-support on 2023-06-01; users should migrate to AWS CDK v2.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and redistribution with minimal restrictions.
Quickstart
pip install aws-cdk.aws-batch
from aws_cdk import aws_batch as batch
from aws_cdk import aws_ec2 as ec2
vpc = ec2.Vpc(self, "VPC")
compute_env = batch.ComputeEnvironment(self, "ComputeEnv",
compute_resources=batch.ComputeResources(vpc=vpc)
)
Requires AWS CDK v1 core library and an active AWS account; AWS CDK v1 is end-of-support as of 2023-06-01.
Verify before relying
- Whether existing CDK v1 deployments using this package continue to function in production after the 2023-06-01 end-of-support date.
- Migration path complexity and effort required to move from CDK v1 to CDK v2 for projects currently using this package.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (~=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — aws-cdk.aws-ec2, aws-cdk.aws-ecr, aws-cdk.aws-ecs, aws-cdk.aws-iam, aws-cdk.aws-secretsmanager, aws-cdk.aws-ssm, aws-cdk.core, constructs, jsii, publication, typeguard |
| Maintenance | actively maintained — 1,152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,336/month — #12,303 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_cdk.aws_batch-1.204.0-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
aws-cdk.aws-ec2Provides AWS CDK constructs for defining EC2…
permissive · top 15,000 on PyPI
aws-cdk.aws-ecsProvides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
aws-cdk.aws-sqsProvides AWS CDK constructs for defining Amazon…
permissive · top 15,000 on PyPI
cdk-gitlab-runnerDefines AWS infrastructure for GitLab Runner…
permissive · top 15,000 on PyPI
aws-cdk.aws-fsxProvides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
aws-cdk.aws-autoscalingProvides CDK constructs for defining and…
permissive · top 15,000 on PyPI
aws-cdk.aws-efsProvides CDK constructs to define Amazon EFS…
permissive · top 15,000 on PyPI
codeflare-sdkCodeFlare SDK provides a Python interface for…
permissive · top 15,000 on PyPI
aws-cdk.aws-elasticloadbalancingv2Provides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
aws-cdk.aws-glue-alphaProvides AWS CDK L2 constructs for defining AWS…
permissive · top 5,000 on PyPI