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

Represents a base image that is used to start from in EC2 Image Builder image builds.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/base-image.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/base-image.ts#L8)

## Example

```ts
const parameterizedComponent = imagebuilder.Component.fromComponentName(
  this,
  'ParameterizedComponent',
  'my-parameterized-component'
);

const imageRecipe = new imagebuilder.ImageRecipe(this, 'ParameterizedImageRecipe', {
  baseImage: imagebuilder.BaseImage.fromSsmParameterName(
    '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
  ),
  components: [
    {
      component: parameterizedComponent,
      parameters: {
        environment: imagebuilder.ComponentParameterValue.fromString('production'),
        version: imagebuilder.ComponentParameterValue.fromString('1.0.0')
      }
    }
  ]
});
```

## Properties

- `image`: string (required) — The rendered base image to use.

## Methods

- `fromAmiId(amiId: string): BaseImage // chainable` (static) — The AMI ID to use as a base image in an image recipe.

  **Parameters**

  - `amiId` — The AMI ID to use as the base image.

- `fromImage(image: IImage): BaseImage // chainable` (static) — The EC2 Image Builder image to use as a base image in an image recipe.

  **Parameters**

  - `image` — The EC2 Image Builder image to use as a base image.

- `fromMarketplaceProductId(productId: string): BaseImage // chainable` (static) — The marketplace product ID for an AMI product to use as the base image in an image recipe.

  **Parameters**

  - `productId` — The Marketplace AMI product ID to use as the base image.

- `fromSsmParameter(parameter: IParameter): BaseImage // chainable` (static) — The SSM parameter to use as the base image in an image recipe.

  **Parameters**

  - `parameter` — The SSM parameter to use as the base image.

- `fromSsmParameterName(parameterName: string): BaseImage // chainable` (static) — The parameter name for the SSM parameter to use as the base image in an image recipe.

  **Parameters**

  - `parameterName` — The name of the SSM parameter to use as the base image.

- `fromString(baseImageString: string): BaseImage // chainable` (static) — The direct string value of the base image to use in an image recipe.

  This can be an EC2 Image Builder image ARN,
  an SSM parameter, an AWS Marketplace product ID, or an AMI ID.

  **Parameters**

  - `baseImageString` — The base image as a direct string value.
