# AutoScalingGroupOptions

Options for adding an AutoScalingGroup as capacity.

- Source: [`aws-eks-v2/lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-eks-v2/lib/cluster.ts#L2241)
- Type last changed: v2.240.0 · 23 Feb 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks_v2 as eks_v2 } from 'aws-cdk-lib';
const autoScalingGroupOptions: eks_v2.AutoScalingGroupOptions = {
  bootstrapEnabled: false,
  bootstrapOptions: {
    additionalArgs: 'additionalArgs',
    awsApiRetryAttempts: 123,
    dnsClusterIp: 'dnsClusterIp',
    dockerConfigJson: 'dockerConfigJson',
    enableDockerBridge: false,
    kubeletExtraArgs: 'kubeletExtraArgs',
    useMaxPods: false,
  },
  machineImageType: eks_v2.MachineImageType.AMAZON_LINUX_2,
};
```

## Properties

- `bootstrapEnabled`: boolean = true — Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke `/etc/eks/bootstrap.sh`) and associate it with the EKS cluster.

  If you wish to provide a custom user data script, set this to `false` and
  manually invoke `autoscalingGroup.addUserData()`.

- `bootstrapOptions`: [BootstrapOptions](/cdk/api/v2/docs/aws-cdk-lib.aws_eks_v2.BootstrapOptions.html) — Allows options for node bootstrapping through EC2 user data.

  **Default:** default options

- `machineImageType`: [MachineImageType](/cdk/api/v2/docs/aws-cdk-lib.aws_eks_v2.MachineImageType.html) = MachineImageType.AMAZON_LINUX_2 — Allow options to specify different machine image type.
