Skip to main content

ebdeploy

A lightweight Python library for automating deployments to AWS Elastic Beanstalk.

Installation

pip install ebdeploy
# or from source:
pip install -e .

Configuration

Run the interactive setup wizard to generate .elasticbeanstalk/ebdeploy.yml:

ebdeploy init

Or copy ebdeploy.yml.example → .elasticbeanstalk/ebdeploy.yml and fill in the values:

app_name: myproject-client               # <project>-<client>
environment: myproject-client-stage      # <project>-<client>-<env>
s3_bucket: mybucket
s3_prefix: myproject/stage/client        # <project>/<env>/<client>
aws_region: us-east-1
aws_profile: my-aws-profile              # remove to use the default profile

All parameters can be overridden with EB_* environment variables:

Variable Config field
EB_APP_NAME app_name
EB_ENVIRONMENT environment
EB_S3_BUCKET s3_bucket
EB_S3_PREFIX s3_prefix
EB_AWS_REGION aws_region
EB_AWS_PROFILE aws_profile

.ebignore

Create a .ebignore file in your project root to exclude files from the deployment archive. Uses the same glob syntax as .gitignore:

# .ebignore
tests/
*.log
docs/
.env.local

CLI

# Interactive setup
ebdeploy init
ebdeploy init --reconfigure

# Full deploy (version = git SHA)
ebdeploy deploy

# Deploy with a custom version label
ebdeploy deploy --version v1.2.3

# Dry-run (build archive only, no AWS calls)
ebdeploy deploy --dry-run

# Show environment status
ebdeploy status

# Build archive only
ebdeploy package --output deploy.zip

# Override config via CLI flags
ebdeploy deploy --profile prod-profile --environment myapp-prod

Makefile

Add to your Makefile:

.PHONY: deploy deploy-dry status

deploy:
        ebdeploy deploy

deploy-dry:
        ebdeploy deploy --dry-run

status:
        ebdeploy status

Python API

from ebdeploy import Deployer, DeployConfig

cfg = DeployConfig.auto()          # reads ebdeploy.yml + ENV
deployer = Deployer(cfg)

# Full deploy
version = deployer.deploy()

# Dry-run
deployer.deploy(dry_run=True)

# Build archive only
deployer.package(output_path="deploy.zip")

# Environment status
info = deployer.status()
print(info["Status"], info["Health"])

How it works

git rev-parse --short HEAD  →  version label (e.g. a1b2c3d)
        │
        ▼
git archive HEAD -o deploy.zip   (or zip with all files)
        │
        ▼
aws s3 cp deploy.zip s3://<bucket>/<project>/<env>/<client>/<version>.zip
        │
        ▼
aws elasticbeanstalk create-application-version
        │
        ▼
aws elasticbeanstalk update-environment
        │
        ▼
Poll every 15s → wait for Status=Ready ✓

Tests

pip install -e ".[dev]"
pytest tests/ -v

Metadata

Release files for ebdeploy 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebdeploy 0.1.5
File Size Uploaded Provenance Actions
ebdeploy-0.1.5.tar.gz 20.4 kB Without provenance Details for ebdeploy-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ebdeploy 0.1.5
File Interpreter ABI Platform Actions
ebdeploy-0.1.5-py3-none-any.whl Python 3 none any Details for ebdeploy-0.1.5-py3-none-any.whl

Total release size: 37.4 kB

Release files / ebdeploy-0.1.5.tar.gz

Download URL ebdeploy-0.1.5.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e8ad82308d6c350b324a5921d62ccdc6a1bacc75a2fb776a1e85b6a0a3ec73f2
BLAKE2b-256 checksum
How to use checksums
b0bdeffdec5230c25320efd7b2c9a496e49ab708d4a8655075a33eface1022ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.8

Release files / ebdeploy-0.1.5-py3-none-any.whl

Download URL ebdeploy-0.1.5-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b5b3aa7836954e7437d36fc45b0eac74216ffdd1d1cf90ce7e6564c3b8bc60c
BLAKE2b-256 checksum
How to use checksums
ba79d01f6b97a4a6263859e3951106d0fc8d4bf7be4860ff012373ea48dd2411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.8

Security for ebdeploy 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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