tb_pulumi.autoscale

Infrastructural patterns related to AWS Application Autoscaling.

class tb_pulumi.autoscale.EcsServiceAutoscaler(name: str, project: ThunderbirdPulumiProject, service: Service, cpu_threshold: int = 70, cooldown: int = 300, disable_scale_in: bool = False, max_capacity: int = 2, min_capacity: int = 1, ram_threshold: int = 70, suspend: bool = False, opts: ResourceOptions = None, **kwargs)

Bases: ThunderbirdComponentResource

Pulumi Type: tb:autoscale:EcsServiceAutoscaler

Builds an autoscaler for an ECS Service.

Produces the following resources:

Parameters:
  • name (str) – A string identifying this set of resources.

  • project (tb_pulumi.ThunderbirdPulumiProject) – The ThunderbirdPulumiProject to add these resources to.

  • service (aws.ecs.Service) – The aws.ecs.Service to build this autoscaler for.

  • cpu_threshold (int, optional) – Point at which we scale based on the average CPU consumption across service containers. Defaults to 70.

  • cooldown (int, optional) – Number of seconds to wait between scaling events, used to prevent rapid fluctuations in capacity. Defaults to 300.

  • disable_scale_in (bool, optional) – When True, prevents the cluster from scaling in while still allowing scale-outs. Defaults to False.

  • max_capacity (int, optional) – Maximum number of containers to run in the cluster. Defaults to 2.

  • min_capacity (int, optional) – Minimum number of containers to run in the cluster. Defaults to 1.

  • ram_threshold (int, optional) – Point at which we scale based on the average memory usage across service containers. Defaults to 70.

  • suspend (bool, optional) – When True, suspends all scaling operations. Defaults to False.

  • opts (pulumi.ResourceOptions, optional) – Additional pulumi.ResourceOptions to apply to these resources. Defaults to None.

  • kwargs – Any other keyword arguments which will be passed as inputs to the ThunderbirdComponentResource superconstructor.