ecs_composex.ecs.service_scaling package

Submodules

ecs_composex.ecs.service_scaling.helpers module

ecs_composex.ecs.service_scaling.helpers. define_new_config ( config , key , new_config ) [source]
Return type :

None

ecs_composex.ecs.service_scaling.helpers. define_step_adjustment ( pre_upper , ordered , cfn_steps ) [source]

Creates the steps list for step scaling.

Return type :

None

ecs_composex.ecs.service_scaling.helpers. define_tracking_target_configuration ( target_scaling_config , config_key ) [source]

Function to create the configuration for target tracking scaling

Return type :

troposphere.applicationautoscaling.TargetTrackingScalingPolicyConfiguration

ecs_composex.ecs.service_scaling.helpers. generate_alarm_scaling_out_policy ( service_name , service_template , scaling_def , scaling_source = None ) [source]

Function to create the scaling out policy based on steps

Return type :

troposphere.applicationautoscaling.ScalingPolicy

ecs_composex.ecs.service_scaling.helpers. generate_scaling_out_steps ( steps , target ) [source]

Function to generate the scaling steps from the defined definition

Return type :

list [ troposphere.applicationautoscaling.StepAdjustment ]

ecs_composex.ecs.service_scaling.helpers. handle_defined_target_scaling_props ( prop , config , key , new_config ) [source]
Return type :

None

ecs_composex.ecs.service_scaling.helpers. handle_defined_x_aws_autoscaling ( configs , service ) [source]

Function to sort out existing or not x-aws-autoscaling in the deploy section

Return type :

None

ecs_composex.ecs.service_scaling.helpers. handle_range ( config , key , new_range ) [source]

Function to handle Range.

Return type :

None

ecs_composex.ecs.service_scaling.helpers. handle_scheduled_actions ( config , config_name , definition ) [source]

Ensures all Scheduled actions defined across the services are unique

Return type :

None

ecs_composex.ecs.service_scaling.helpers. handle_target_scaling ( config , key , new_config ) [source]

Function to handle merge of target tracking config

Return type :

None

ecs_composex.ecs.service_scaling.helpers. merge_family_services_scaling ( services ) [source]
Return type :

dict

ecs_composex.ecs.service_scaling.helpers. rectify_scaling_steps ( cfn_steps ) [source]

Function to rectify settings to avoid errors with invalid step scaling configuration.

Return type :

None

ecs_composex.ecs.service_scaling.helpers. reset_to_zero_policy ( service_name , service_template , scaling_def , scaling_source = None ) [source]

Defines a policy allowing to reset to 0 containers.

Return type :

troposphere.applicationautoscaling.ScalingPolicy

ecs_composex.ecs.service_scaling.helpers. validate_steps_definition ( steps , unordered ) [source]

Validates that the steps definition is correct

Parameters :
  • steps ( list ) – list of step definitions

  • unordered ( list ) – list of steps, unordered.

Return type :

None

Module contents

Package to help generate target scaling policies for given alarms.

class ecs_composex.ecs.service_scaling. ServiceScaling ( family ) [source]

Bases: object

Class to group the configuration for Service scaling

Variables :

family ( ComposeFamily ) –

add_scheduled_actions ( ) [source]

Sets the scheduled actions

Return type :

None

add_target_scaling ( ) [source]

Adds target scaling rules

Return type :

None

create_scalable_target ( ) [source]

Method to automatically create a scalable target

defined = False
property replicas
target_scaling_keys = ['CpuTarget', 'MemoryTarget', 'TgtTargetsCount']