A Lambda capacity provider that manages compute resources for Lambda functions.
import { CapacityProvider } from 'aws-cdk-lib/aws-lambda';Or use the module namespace:
import * as lambda from 'aws-cdk-lib/aws-lambda';
// lambda.CapacityProviderConfiguration passed to the constructor as CapacityProviderProps.
securityGroupsRequiredISecurityGroup[]A list of security group IDs to associate with EC2 instances launched by the capacity provider. Up to 5 security groups can be specified.
subnetsRequiredISubnet[]A list of subnets where the capacity provider can launch EC2 instances. At least one subnet must be specified, and up to 16 subnets are supported.
architecturesOptionalArchitecture[]The instruction set architecture required for compute instances. Only one architecture can be specified per capacity provider.
Default: - No architecture constraints specified
capacityProviderNameOptionalstringThe name of the capacity provider. The name must be unique within the AWS account and region.
Default: - AWS CloudFormation generates a unique physical ID and uses that
ID for the capacity provider's name.
instanceTypeFilterOptionalInstanceTypeFilterConfiguration for filtering instance types that the capacity provider can use.
Default: - No instance type filtering applied
kmsKeyOptionalIKeyThe AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider.
Default: - No KMS key specified, uses an AWS-managed key instead
maxVCpuCountOptionalnumberThe maximum number of vCPUs that the capacity provider can scale up to.
Default: - No maximum limit specified, service default is 400
operatorRoleOptionalIRoleThe IAM role that the Lambda service assumes to manage the capacity provider.
Default: - A role will be generated containing the AWSLambdaManagedEC2ResourceOperator managed policy
scalingOptionsOptionalScalingOptionsThe options for scaling a capacity provider, including scaling policies.
Default: - The `Auto` option is applied by default
Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.
Download Free Infographicaws-lambda