CapacityProviderFunctionOptions
- class aws_cdk.aws_lambda.CapacityProviderFunctionOptions(*, execution_environment_memory_gib_per_v_cpu=None, latest_published_scaling_config=None, per_execution_environment_max_concurrency=None, publish_to_latest_published=None)
Bases:
objectOptions for creating a function associated with a capacity provider.
- Parameters:
execution_environment_memory_gib_per_v_cpu (
Union[int,float,None]) – Specifies the execution environment memory per VCPU, in GiB. Default: 2.0latest_published_scaling_config (
Union[LatestPublishedScalingConfig,Dict[str,Any],None]) – The scaling options that are applied to the $LATEST.PUBLISHED version. Default: - No scaling limitations are applied to the $LATEST.PUBLISHED version.per_execution_environment_max_concurrency (
Union[int,float,None]) – Specifies the maximum number of concurrent invokes a single execution environment can handle. Default: Maximum is set to 10publish_to_latest_published (
Optional[bool]) – A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version. Default: - True
- ExampleMetadata:
infused
Example:
# capacity_provider: lambda.CapacityProvider fn = lambda_.Function(self, "MyFunction", # Runtime must be equal to or newer than NODEJS_22_X runtime=lambda_.Runtime.NODEJS_22_X, handler="index.handler", code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler")) ) # Associate the function with the capacity provider capacity_provider.add_function(fn, per_execution_environment_max_concurrency=10, execution_environment_memory_gi_bPer_vCpu=4 )
Attributes
- execution_environment_memory_gib_per_v_cpu
Specifies the execution environment memory per VCPU, in GiB.
- Default:
2.0
- latest_published_scaling_config
The scaling options that are applied to the $LATEST.PUBLISHED version.
- Default:
No scaling limitations are applied to the $LATEST.PUBLISHED version.
- per_execution_environment_max_concurrency
Specifies the maximum number of concurrent invokes a single execution environment can handle.
- Default:
Maximum is set to 10
- publish_to_latest_published
A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.
- Default:
True