A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_lambda/AutoScalingOptions.html below:

Website Navigation


AutoScalingOptions — AWS Cloud Development Kit 1.204.0 documentation

AutoScalingOptions
class aws_cdk.aws_lambda.AutoScalingOptions(*, max_capacity, min_capacity=None)

Bases: object

Properties for enabling Lambda autoscaling.

Parameters:
  • max_capacity (Union[int, float]) – Maximum capacity to scale to.

  • min_capacity (Union[int, float, None]) – Minimum capacity to scale to. Default: 1

ExampleMetadata:

infused

Example:

import aws_cdk.aws_autoscaling as autoscaling

# fn: lambda.Function

alias = fn.add_alias("prod")

# Create AutoScaling target
as = alias.add_auto_scaling(max_capacity=50)

# Configure Target Tracking
as.scale_on_utilization(
    utilization_target=0.5
)

# Configure Scheduled Scaling
as.scale_on_schedule("ScaleUpInTheMorning",
    schedule=autoscaling.Schedule.cron(hour="8", minute="0"),
    min_capacity=20
)

Attributes

max_capacity

Maximum capacity to scale to.

min_capacity

Minimum capacity to scale to.

Default:

1


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4