Skip to main content
RED Logo

RED

Automates the heavy lifting of running containerized jobs on AWS Batch.


Red Demo

RED Logo

RED

Really Easy Deployments

Deploy containerized tasks and scheduled batch workloads to AWS Batch in seconds.

Python 3.12+ Platform


RED automates the heavy lifting of running containerized jobs on AWS Batch. It builds your Docker image, provisions an Amazon ECR repository, configures the AWS Batch compute environment, handles recurring cron schedules, and pulls logs directly to your terminal—all without manually wrestling with the AWS Console or writing CloudFormation/Terraform.

Features

  • Zero-Fuss Setup: Interactive prompt initializes your project, VPC settings, and resource sizing.
  • 🐳 Automated Deployments: Builds and pushes your local Docker image to AWS ECR and registers job definitions.
  • ⏱️ Flexible Execution: Trigger ad-hoc runs with custom JSON payloads or create recurring cron tasks.
  • 🪵 Built-in Logging: Stream your CloudWatch logs directly to your terminal.
  • 🧹 One-Command Cleanup: Tear down all provisioned Batch and ECR resources cleanly.

Prerequisites

Before using RED, ensure you have:

  • macOS (currently optimized for Mac environments)
  • Python 3.12+
  • Docker Desktop installed and running
  • AWS CLI configured locally (aws configure) with permissions for ECR, AWS Batch, IAM, and CloudWatch.

Installation

Install the CLI directly via pip:

pip install red-cli

Verify installation:

red --help

Quickstart in 5 Minutes

1. Initialize your project

Run the interactive setup in your application folder:

red init

This generates a starter Dockerfile, main.py, and a .red configuration file containing your infrastructure defaults.

2. Deploy infrastructure & image

Build your container, push it to ECR, and configure AWS Batch:

red deploy

3. Run a job

Trigger an immediate job execution:

red run --payload '{"action": "process_records", "batch_size": 100}'

4. Tail the logs

Stream output from the latest run:

red log --latest

5. Tear down (when finished)

Destroy all provisioned AWS Batch and ECR resources:

red kill

CLI Reference

red init

Runs an interactive wizard to configure compute sizing (vCPU, memory, timeout), VPC subnets, and security groups.

red init

red deploy

Builds your local Docker container, pushes it to your dedicated ECR repo, and registers/updates the AWS Batch job definition.

red deploy

red run

Triggers an immediate batch job or schedules a recurring task.

Flag Short Description Default
--payload -p JSON string passed to the container {}
--cron -c Interactive prompt to register as a recurring cron schedule Off

Examples:

# Run immediately with default payload
red run

# Run with a custom payload
red run --payload '{"file": "data.csv"}'

# Schedule as a recurring cron job
red run --cron
# Prompt will ask for: Schedule name, Cron expression (e.g. cron(0 12 * * ? *))

red log

Fetch CloudWatch execution logs for your jobs.

Flag Short Description
--latest -l Immediately tail the most recent job run
# Interactive selection menu of past runs
red log

# Directly stream the latest run
red log --latest

red cron

View or remove scheduled cron triggers.

Flag Short Description
--delete -d Interactively select and remove existing schedules
# List all active schedules
red cron

# Delete a schedule
red cron --delete

red kill

Deconstructs provisioned AWS infrastructure to avoid unintended costs.

Flag Short Description
--schedule -s Delete only a specific cron schedule by name
# Delete all project resources (Batch compute environment, job definitions, ECR repo)
red kill

# Delete only a specific cron schedule
red kill --schedule "daily-sync-job"

Configuration (.red)

Your project setup is saved in a .red JSON file in the project root. You can edit this file manually to tweak sizing or container properties before running red deploy.

Example .red File

{
  "Name": "data-processor",
  "Arch": "arm64",
  "Cpu": 2,
  "MemorySize": 4096,
  "StorageSize": 30,
  "Timeout": 60,
  "assignPublicIp": "ENABLED",
  "VPC": {
    "SubnetIds": ["subnet-0123456789abcdef0"],
    "SecurityGroupIds": ["sg-0123456789abcdef0"]
  },
  "Envs": {
    "ENVIRONMENT": "production",
    "API_SECRET": "ssmParam::app/production/api_secret"
  },
  "BuildContext": ".",
  "DockerfilePath": "Dockerfile",
  "ImageOverride": null,
  "IamPolicy": {},
  "ContainerProperties": {}
}

Configuration Options

Field Type Default Description
Name string (Folder name) Base name applied to all AWS resources (alphanumeric only).
Arch string x86_64 x86_64 or arm64. Choose arm64 if building on Apple Silicon.
Cpu number 1 Allotted vCPUs (valid Batch values).
MemorySize number 2048 Memory allotment in MiB.
StorageSize number 21 Ephemeral scratch storage in GiB (Range: 21 - 200).
Timeout number 1 Maximum runtime in minutes before the job is terminated (Max: 10000).
assignPublicIp string DISABLED ENABLED or DISABLED. Set to ENABLED if subnets lack a NAT gateway.
VPC object Required Array of SubnetIds and SecurityGroupIds. Subnets must have egress access.
Envs object {} Key/value environment variables. Prefix value with ssmParam:: to resolve AWS SSM parameters.
BuildContext string . Directory context passed to Docker build.
DockerfilePath string Dockerfile Relative path to the project Dockerfile.
ImageOverride string null Provide an existing ECR URI to skip building locally.
IamPolicy object {} Custom IAM policy block appended to the job task execution role.
ContainerProperties object {} Pass raw overrides to ECS/Batch task definitions.

Roadmap

  • Interactive terminal session into active running jobs (red sh via AWS SSM Session Manager).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_red-3.0.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file aws_red-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: aws_red-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for aws_red-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aea780162bd5ed413b7d7aa85413e5cb82a43ee836f1bfc0dca574acf38e8752
MD5 e852d3c5dc14e3f715e48b0cff03d353
BLAKE2b-256 3d96688be77b81400dab04ddadc828fe214027a5fdf2f867b5d0dee1141fb55b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.0.1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page