ecs_composex.ecs package

Subpackages

Submodules

ecs_composex.ecs.ecs_conditions module

Parameters relating to ECS.

This is a crucial part as all the titles, maked _T are string which are then used the same way across all imports, which gives consistency for CFN to use the same names, which it heavily relies onto.

You can change the names values so you like so long as you keep it Alphanumerical [a-zA-Z0-9]

ecs_composex.ecs.ecs_conditions. use_external_lt_con ( if_true , if_false ) [source]

Function to return the If() to simplify !If USE_EXTERNAL_LT_T

Returns :

If(USE_EXTERNAL_LT_T, if_true, if_false)

Return type :

If

ecs_composex.ecs.ecs_params module

Parameters bound to ecs_composex.ecs This is a crucial part as all the titles, maked _T are string which are then used the same way across all imports, which gives consistency for CFN to use the same names, which it heavily relies onto.

You can change the names values so you like so long as you keep it [a-zA-Z0-9]

ecs_composex.ecs.ecs_params. get_import_service_group_id ( remote_service_name ) [source]

Function to return the ImportValue(Sub()) for given ecs_service name

ecs_composex.ecs.ecs_stack module

ecs_composex.ecs.ecs_stack. add_compose_families ( settings , families_sg_stack ) [source]

Using existing ComposeFamily in settings, creates the ServiceStack and template

Return type :

None

ecs_composex.ecs.ecs_stack. handle_families_dependencies ( settings , families_post ) [source]

Function to handle family to family services based on docker compose depends_on

Parameters :
Return type :

None

ecs_composex.ecs.ecs_stack. initialize_family_services ( settings , family ) [source]

Function to handle creation of services within the same family.

Parameters :
Return type :

None

Returns :

Module contents

Core module for ECS ComposeX.

This module is going to parse each ecs_service and each x-resource key from the compose file (hence Compose-X) and determine its

  • ServiceDefinition

  • TaskDefinition

  • TaskRole

  • ExecutionRole

It is going to also, based on the labels set in the compose file

  • Add the ecs_service to Service Discovery via AWS CloudMap

  • Add load-balancers to dispatch traffic to the microservice

Services logic

  • Define Container Definitions

** Compute ** Storage ** Docker Settings ** Logging Settings ** Env Vars ** Secrets

  • Define Task Definition

** IAM Roles ** Containers ** Volumes (Docker volumes / EFS) ** AppMesh/Proxy Settings

  • Define Service Definition

** Network settings (VPC/SG) ** Ingress settings (ALB/NLB/CloudMap)