> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# AmazonManagedImage

Helper class for working with Amazon-managed images.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/amazon-managed-image.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/amazon-managed-image.ts#L56)

## Example

TypeScript:

```ts
// Amazon Linux 2023 AMI for x86_64
const amazonLinux2023Ami = imagebuilder.AmazonManagedImage.amazonLinux2023(this, 'AmazonLinux2023', {
  imageType: imagebuilder.ImageType.AMI,
  imageArchitecture: imagebuilder.ImageArchitecture.X86_64
});

// Ubuntu 22.04 AMI for ARM64
const ubuntu2204Ami = imagebuilder.AmazonManagedImage.ubuntuServer2204(this, 'Ubuntu2204', {
  imageType: imagebuilder.ImageType.AMI,
  imageArchitecture: imagebuilder.ImageArchitecture.ARM64
});

// Windows Server 2022 Full AMI
const windows2022Ami = imagebuilder.AmazonManagedImage.windowsServer2022Full(this, 'Windows2022', {
  imageType: imagebuilder.ImageType.AMI,
  imageArchitecture: imagebuilder.ImageArchitecture.X86_64
});

// Use as base image in recipe
const managedImageRecipe = new imagebuilder.ImageRecipe(this, 'ManagedImageRecipe', {
  baseImage: amazonLinux2023Ami.toBaseImage()
});
```

Python:

```python
# Amazon Linux 2023 AMI for x86_64
amazon_linux2023_ami = imagebuilder.AmazonManagedImage.amazon_linux2023(self, "AmazonLinux2023",
    image_type=imagebuilder.ImageType.AMI,
    image_architecture=imagebuilder.ImageArchitecture.X86_64
)

# Ubuntu 22.04 AMI for ARM64
ubuntu2204_ami = imagebuilder.AmazonManagedImage.ubuntu_server2204(self, "Ubuntu2204",
    image_type=imagebuilder.ImageType.AMI,
    image_architecture=imagebuilder.ImageArchitecture.ARM64
)

# Windows Server 2022 Full AMI
windows2022_ami = imagebuilder.AmazonManagedImage.windows_server2022_full(self, "Windows2022",
    image_type=imagebuilder.ImageType.AMI,
    image_architecture=imagebuilder.ImageArchitecture.X86_64
)

# Use as base image in recipe
managed_image_recipe = imagebuilder.ImageRecipe(self, "ManagedImageRecipe",
    base_image=amazon_linux2023_ami.to_base_image()
)
```

Java:

```java
// Amazon Linux 2023 AMI for x86_64
IImage amazonLinux2023Ami = AmazonManagedImage.amazonLinux2023(this, "AmazonLinux2023", AmazonManagedImageOptions.builder()
        .imageType(ImageType.AMI)
        .imageArchitecture(ImageArchitecture.X86_64)
        .build());

// Ubuntu 22.04 AMI for ARM64
IImage ubuntu2204Ami = AmazonManagedImage.ubuntuServer2204(this, "Ubuntu2204", AmazonManagedImageOptions.builder()
        .imageType(ImageType.AMI)
        .imageArchitecture(ImageArchitecture.ARM64)
        .build());

// Windows Server 2022 Full AMI
IImage windows2022Ami = AmazonManagedImage.windowsServer2022Full(this, "Windows2022", AmazonManagedImageOptions.builder()
        .imageType(ImageType.AMI)
        .imageArchitecture(ImageArchitecture.X86_64)
        .build());

// Use as base image in recipe
ImageRecipe managedImageRecipe = ImageRecipe.Builder.create(this, "ManagedImageRecipe")
        .baseImage(amazonLinux2023Ami.toBaseImage())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
// Amazon Linux 2023 AMI for x86_64
var amazonLinux2023Ami = AmazonManagedImage.AmazonLinux2023(this, "AmazonLinux2023", new AmazonManagedImageOptions {
    ImageType = ImageType.AMI,
    ImageArchitecture = ImageArchitecture.X86_64
});

// Ubuntu 22.04 AMI for ARM64
var ubuntu2204Ami = AmazonManagedImage.UbuntuServer2204(this, "Ubuntu2204", new AmazonManagedImageOptions {
    ImageType = ImageType.AMI,
    ImageArchitecture = ImageArchitecture.ARM64
});

// Windows Server 2022 Full AMI
var windows2022Ami = AmazonManagedImage.WindowsServer2022Full(this, "Windows2022", new AmazonManagedImageOptions {
    ImageType = ImageType.AMI,
    ImageArchitecture = ImageArchitecture.X86_64
});

// Use as base image in recipe
var managedImageRecipe = new ImageRecipe(this, "ManagedImageRecipe", new ImageRecipeProps {
    BaseImage = amazonLinux2023Ami.ToBaseImage()
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
// Amazon Linux 2023 AMI for x86_64
amazonLinux2023Ami := imagebuilder.AmazonManagedImage_AmazonLinux2023(this, jsii.String("AmazonLinux2023"), &AmazonManagedImageOptions{
	ImageType: imagebuilder.ImageType_AMI,
	ImageArchitecture: imagebuilder.ImageArchitecture_X86_64,
})

// Ubuntu 22.04 AMI for ARM64
ubuntu2204Ami := imagebuilder.AmazonManagedImage_UbuntuServer2204(this, jsii.String("Ubuntu2204"), &AmazonManagedImageOptions{
	ImageType: imagebuilder.ImageType_AMI,
	ImageArchitecture: imagebuilder.ImageArchitecture_ARM64,
})

// Windows Server 2022 Full AMI
windows2022Ami := imagebuilder.AmazonManagedImage_WindowsServer2022Full(this, jsii.String("Windows2022"), &AmazonManagedImageOptions{
	ImageType: imagebuilder.ImageType_AMI,
	ImageArchitecture: imagebuilder.ImageArchitecture_X86_64,
})

// Use as base image in recipe
managedImageRecipe := imagebuilder.NewImageRecipe(this, jsii.String("ManagedImageRecipe"), &ImageRecipeProps{
	BaseImage: amazonLinux2023Ami.ToBaseImage(),
})
```

## Initializer

TypeScript:

```ts
new AmazonManagedImage()
```

Python:

```python
AmazonManagedImage()
```

Java:

```java
new AmazonManagedImage()
```

C# / .NET:

```csharp
new AmazonManagedImage()
```

Golang:

```go
NewAmazonManagedImage()
```

## Methods

- `amazonLinux2(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Amazon Linux 2 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `amazonLinux2023(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Amazon Linux 2023 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `fromAmazonManagedImageAttributes(scope: Construct, id: string, attrs: AmazonManagedImageAttributes): IImage` (static) — Imports an Amazon-managed image from its attributes.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `attrs` — - The Amazon-managed image attributes.

- `fromAmazonManagedImageName(scope: Construct, id: string, amazonManagedImageName: string): IImage` (static) — Imports an Amazon-managed image from its name.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `amazonManagedImageName` — - The name of the Amazon-managed image.

- `macOS14(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the macOS 14 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `macOS15(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the macOS 15 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `redHatEnterpriseLinux10(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Red Hat Enterprise Linux 10 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `suseLinuxEnterpriseServer15(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the SUSE Linux Enterprise Server 15 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `ubuntuServer2204(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Ubuntu 22.04 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `ubuntuServer2404(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Ubuntu 24.04 Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2016Core(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2016 Core Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2016Full(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2016 Full Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2019Core(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2019 Core Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2019Full(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2019 Full Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2022Core(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2022 Core Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2022Full(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2022 Full Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2025Core(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2025 Core Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.

- `windowsServer2025Full(scope: Construct, id: string, opts: AmazonManagedImageOptions): IImage` (static) — Imports the Windows Server 2025 Full Amazon-managed image.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed image attributes.
