ecs_composex.ecs.service_compute package

Submodules

ecs_composex.ecs.service_compute.helpers module

ecs_composex.ecs.service_compute.helpers. merge_capacity_providers ( service_compute ) [source]

Merge capacity providers set on the services of the task service_compute.family if service is not sidecar

Module contents

Module to manage the compute settings of the ECS Service

  • Launch Type

  • Capacity Providers

Unrelated to the Task compute settings (RAM/CPU)

class ecs_composex.ecs.service_compute. ServiceCompute ( family ) [source]

Bases: object

Class to manage the ECS Service settings for launch type and capacity providers

apply_capacity_providers_to_service ( providers ) [source]
property cfn_launch_type
property ecs_capacity_providers
property launch_type
set_update_capacity_providers ( ) [source]

If the Launch Type is not EXTERNAL, will merge the capacity providers defined by the services.x-ecs of the family services.

Return type :

None

set_update_launch_type ( ) [source]

Defines all the possible launch types defined on the services of the task into launch_types If this is the first time we run the function, and we don’t have either self.launch_type nor launch_types we default to Fargate Considering that EXTERNAL > EC2 > FARGATE in priority, we stop at that launch_type as soon as any service has it set in its properties. If launch_type wasn’t set, we stop at the highest priority type If launch_type was already set, we evaluate it a new service might have a different launch_type, higher priority If we are already all set, debug log it. Otherwise, if somehow we didn’t get into any of these conditions, pick default => Fargate

Return type :

None