# CapacityProviderProps

Properties for creating a Lambda capacity provider.

Extends: CapacityProviderProps
Used as props by: CapacityProvider

- Source: [`aws-lambda/lib/capacity-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-lambda/lib/capacity-provider.ts#L41)
- Type last changed: v2.263.0 · 31 Jul 2026

## Example

```ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as logs from 'aws-cdk-lib/aws-logs';

const vpc = new ec2.Vpc(this, 'MyVpc');
const securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', { vpc });

const capacityProvider = new lambda.CapacityProvider(this, 'MyCapacityProvider', {
  subnets: vpc.privateSubnets,
  securityGroups: [securityGroup],
  logGroup: new logs.LogGroup(this, 'CpLogs', {
    logGroupName: '/aws/lambda/capacity-provider/my-cp',
  }),
  systemLogLevel: lambda.SystemLogLevel.DEBUG,
});
```

## Properties

- `architectures`: [Architecture](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Architecture.html)[] — The instruction set architecture required for compute instances.

  **Default:** No architecture constraints specified

  Only one architecture can be specified per capacity provider.

- `capacityProviderName`: string — The name of the capacity provider.

  **Default:** AWS CloudFormation generates a unique physical ID and uses that ID for the capacity provider's name.

  The name must be unique within the AWS account and region.

- `instanceTypeFilter`: [InstanceTypeFilter](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.InstanceTypeFilter.html) — Configuration for filtering instance types that the capacity provider can use.

  **Default:** No instance type filtering applied

- `kmsKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The 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

- `logGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — The CloudWatch log group for capacity provider system logs.

  **Default:** Service creates a default log group at /aws/lambda/capacity-provider/<name>

- `maxVCpuCount`: number — The maximum number of vCPUs that the capacity provider can scale up to.

  **Default:** No maximum limit specified, service default is 400

- `operatorRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that the Lambda service assumes to manage the capacity provider.

  **Default:** A role will be generated containing the AWSLambdaManagedEC2ResourceOperator managed policy

- `propagateTags`: [PropagateTags](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.PropagateTags.html) — Configuration for tag propagation to managed resources (EC2 instances, ENIs, EBS volumes).

  **Default:** No tag propagation; tags are not propagated to managed resources.

  Use the static factory methods on `PropagateTags` to create:
  - `PropagateTags.none()` - Explicitly disable tag propagation
  - `PropagateTags.explicit(tags)` - Propagate specified tags

- `scalingOptions`: [ScalingOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.ScalingOptions.html) — The options for scaling a capacity provider, including scaling policies.

  **Default:** The `Auto` option is applied by default

- `securityGroups`: [ISecurityGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] (required) — A list of security group IDs to associate with EC2 instances launched by the capacity provider.

  Up to 5 security groups can be specified.

- `subnets`: [ISubnet](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISubnet.html)[] (required) — 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.

- `systemLogLevel`: [SystemLogLevel](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SystemLogLevel.html) — The level of detail for capacity provider system logs.

  **Default:** Service default applies (INFO)
