# AmazonLinux2022Kernel

Amazon Linux 2022 kernel versions.

- Source: [`aws-ec2/lib/machine-image/amazon-linux-2022.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/machine-image/amazon-linux-2022.ts#L7)
- Type last changed: v2.76.0 · 20 Apr 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const amazonLinux2022Kernel = ec2.AmazonLinux2022Kernel.CDK_LATEST;
```

## Initializer

```ts
new AmazonLinux2022Kernel(version: string)
```

## Properties

- `CDK_LATEST`: [AmazonLinux2022Kernel](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2022Kernel.html) (static) — The latest kernel version currently available in a published AMI.

  When a new kernel version is available for an al2022 AMI this will be
  updated to contain the latest kernel version and will cause your instances
  to be replaced. Do not store stateful information on the instance if you are
  using this version.

- `DEFAULT`: [AmazonLinux2022Kernel](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2022Kernel.html) (static) — The default kernel version for Amazon Linux 2022 is 5.15 and the SSM parameter does not include it in the name (i.e. /aws/service/ami-amazon-linux-latest/amzn2022-ami-kernel-default-x86_64).

- `KERNEL_5_15`: [AmazonLinux2022Kernel](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2022Kernel.html) (static) — Kernel version 5.15.

## Methods

- `toString(): string` — Generate a string representation of the kernel.
