Deploy applications to AWS ECS using boto3 and pydantic
Project description
ecs-deployer-boto3
Deploy applications to AWS ECS using boto3 and pydantic.
This library provides a thin, typed wrapper over the AWS ECS deployment API. It is decoupled from how you discover or provision your infrastructure (CloudFormation, CDK, Terraform, or by hand) — you describe your services as pydantic models and the library handles registering task definitions, creating or updating services, cleaning up old revisions, and monitoring deployments.
Supports both EC2 (with placement strategy / constraints) and Fargate (with
capacity provider strategy and awsvpc network configuration).
Installation
pip install ecs-deployer-boto3
Usage
import boto3
from ecs_deployer_boto3 import (
ApplicationUpdater,
Container,
DeploymentMonitor,
Service,
Task,
)
services = [
Service(
name='web',
cluster='my-cluster',
task_definition=Task(
family='web',
containers=[
Container(
name='web',
image='123456789.dkr.ecr.us-east-1.amazonaws.com/web:latest',
port_mappings=[{'container_port': 8000}],
),
],
cpu='256',
memory='512',
requires_compatibilities=['FARGATE'],
),
launch_type='FARGATE',
network_configuration={
'subnets': ['subnet-abc'],
'security_groups': ['sg-abc'],
'assign_public_ip': 'ENABLED',
},
),
]
session = boto3.Session()
updater = ApplicationUpdater(services, session)
updater.update_application(environment={'FOO': 'bar'})
monitor = DeploymentMonitor(services, session)
monitor.monitor(limit_minutes=15)
License
MIT
Project details
Release history Release notifications | RSS feed
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 ecs_deployer_boto3-0.1.0.tar.gz.
File metadata
- Download URL: ecs_deployer_boto3-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
026b894f98a40607116f308fe296a0fddbe42e94e168fed676cb152aff3b494a
|
|
| MD5 |
ed894f47a35637300eaecdd14911d428
|
|
| BLAKE2b-256 |
606c64b5b5510eca508d9346c8ad90a5bd4a08dfb191275757353c5132165591
|
Provenance
The following attestation bundles were made for ecs_deployer_boto3-0.1.0.tar.gz:
Publisher:
ci.yaml on ipeterov/ecs-deployer-boto3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecs_deployer_boto3-0.1.0.tar.gz -
Subject digest:
026b894f98a40607116f308fe296a0fddbe42e94e168fed676cb152aff3b494a - Sigstore transparency entry: 1553209330
- Sigstore integration time:
-
Permalink:
ipeterov/ecs-deployer-boto3@f9cd68c1e8b8888e50427f89ba4ca17b11d136af -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ipeterov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@f9cd68c1e8b8888e50427f89ba4ca17b11d136af -
Trigger Event:
push
-
Statement type:
File details
Details for the file ecs_deployer_boto3-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ecs_deployer_boto3-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58f3f29760156db8fbf87f0cf6eaff5a76485a30bde5e7d46088c16b5693dceb
|
|
| MD5 |
90ad3052a613afe03cf5a05fadde7ba2
|
|
| BLAKE2b-256 |
1621ad3b61356f4fd4e2bc5a6e3484a9569379b8109e43014e8b0111dc7d3a54
|
Provenance
The following attestation bundles were made for ecs_deployer_boto3-0.1.0-py3-none-any.whl:
Publisher:
ci.yaml on ipeterov/ecs-deployer-boto3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecs_deployer_boto3-0.1.0-py3-none-any.whl -
Subject digest:
58f3f29760156db8fbf87f0cf6eaff5a76485a30bde5e7d46088c16b5693dceb - Sigstore transparency entry: 1553209341
- Sigstore integration time:
-
Permalink:
ipeterov/ecs-deployer-boto3@f9cd68c1e8b8888e50427f89ba4ca17b11d136af -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ipeterov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@f9cd68c1e8b8888e50427f89ba4ca17b11d136af -
Trigger Event:
push
-
Statement type: