# AutoScalingGroupOptions

Options for adding an AutoScalingGroup as capacity.

- Source: [`aws-eks/lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-eks/lib/cluster.ts#L2692)

## Example

```ts
declare const cluster: eks.Cluster;
declare const asg: autoscaling.AutoScalingGroup;
cluster.connectAutoScalingGroupCapacity(asg, {});
```

## 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.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.MachineImageType.html) = MachineImageType.AMAZON_LINUX_2 — Allow options to specify different machine image type.

- `mapRole`: boolean — Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC.

  **Default:** true if the cluster has kubectl enabled (which is the default).

  This cannot be explicitly set to `true` if the cluster has kubectl disabled.

- `spotInterruptHandler`: boolean = true — Installs the AWS spot instance interrupt handler on the cluster if it's not already added.

  Only relevant if `spotPrice` is configured on the auto-scaling group.
