Skip to main content

Implement for AWS ECS and Docker Compose what SAM is to Serverless for AWS Lambda

Project description


CodeStyle TDD with pytest BDD with Behave

Codecov Code scan with SonarCloud


Be for AWS ECS and docker-compose what AWS SAM is to Lambda


pip install ecs_composex


usage: ecs_composex [-h] -n NAME -f DOCKERCOMPOSEXFILE [-d OUTPUTDIRECTORY]
                [--format {json,yaml,text}] [--region REGIONNAME]
                [--az ZONES] [-b BUCKETNAME] [--no-upload] [--deploy]
                [_ [_ ...]]

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of your stack
                        Path to the Docker compose file
                        Output directory to write all the templates to.
  --format {json,yaml,text}
                        Defines the format you want to use.
  --region REGIONNAME   Specify the region you want to build fordefault use
                        default region from config or environment vars
  --az ZONES            List AZs you want to deploy to specifically within the
  -b BUCKETNAME, --bucket-name BUCKETNAME
                        Bucket name to upload the templates to
  --no-upload           Whether the templates should be uploaded or not.
  --deploy              Whether or not you would like to deploy the stack to
  --use-spot-fleet      Runs spotfleet for EC2. If used in combination of
                        --use-fargate, it will create an additional SpotFleet


Each component can also use the docker-compose file but be deployed on its own, allowing, for production workloads, to deploy each component separately to avoid dependencies on each other.

AWS Resources support

  • AWS ECS: from docker-compose to ECS transparently, using AWS Fargate primarily.
  • AWS VPC: create or use existing VPC to deploy your services
  • AWS AppMesh: Services mesh for your services.
  • AWS SQS: queues for distributed workloads
  • AWS RDS: databases integration made easy
  • AWS EC2: Deploy your services on EC2 for custom settings. Features SpotFleet by default.
  • AWS KMS: Manage CMK for your deployments


Follow the news and technical articles on using ECS ComposeX on the Blog


If you do not need extra AWS resources such as SQS queues to be created as part of these microservices deployments, I would recommend to use AWS ECS CLI which does already a lot of the work for the services. Alternatively, use the AWS CLI v2. It is absolutely smashing-ly awesome and might be just what you need This tool aims to reproduce the original ECS CLI behaviour whilst adding logic for non ECS resources that you want to create in your environment.


This package would not have been possible without the amazing job done by the AWS CloudFormation team! This package would not have been possible without the amazing community around Troposphere! This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details

Download files

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

Files for ecs-composex, version 0.5.3
Filename, size File type Python version Upload date Hashes
Filename, size ecs_composex-0.5.3-py2.py3-none-any.whl (198.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size ecs_composex-0.5.3.tar.gz (131.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page