class BaseImage
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.BaseImage |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#BaseImage |
Java | software.amazon.awscdk.services.imagebuilder.alpha.BaseImage |
Python | aws_cdk.aws_imagebuilder_alpha.BaseImage |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป BaseImage |
Represents a base image that is used to start from in EC2 Image Builder image builds.
Example
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')
}
}
]
});
Initializer (protected)
super(image: string)
Parameters
- image
string
Properties
| Name | Type | Description |
|---|---|---|
| image | string | The rendered base image to use. |
image
Type:
string
The rendered base image to use.
Methods
| Name | Description |
|---|---|
| static from | The AMI ID to use as a base image in an image recipe. |
| static from | The EC2 Image Builder image to use as a base image in an image recipe. |
| static from | The marketplace product ID for an AMI product to use as the base image in an image recipe. |
| static from | The SSM parameter to use as the base image in an image recipe. |
| static from | The parameter name for the SSM parameter to use as the base image in an image recipe. |
| static from | The direct string value of the base image to use in an image recipe. |
static fromAmiId(amiId)
public static fromAmiId(amiId: string): BaseImage
Parameters
- amiId
stringโ The AMI ID to use as the base image.
Returns
The AMI ID to use as a base image in an image recipe.
static fromImage(image)
public static fromImage(image: IImage): BaseImage
Parameters
- image
IImageโ The EC2 Image Builder image to use as a base image.
Returns
The EC2 Image Builder image to use as a base image in an image recipe.
static fromMarketplaceProductId(productId)
public static fromMarketplaceProductId(productId: string): BaseImage
Parameters
- productId
stringโ The Marketplace AMI product ID to use as the base image.
Returns
The marketplace product ID for an AMI product to use as the base image in an image recipe.
static fromSsmParameter(parameter)
public static fromSsmParameter(parameter: IParameter): BaseImage
Parameters
- parameter
IParameterโ The SSM parameter to use as the base image.
Returns
The SSM parameter to use as the base image in an image recipe.
static fromSsmParameterName(parameterName)
public static fromSsmParameterName(parameterName: string): BaseImage
Parameters
- parameterName
stringโ The name of the SSM parameter to use as the base image.
Returns
The parameter name for the SSM parameter to use as the base image in an image recipe.
static fromString(baseImageString)
public static fromString(baseImageString: string): BaseImage
Parameters
- baseImageString
stringโ The base image as a direct string value.
Returns
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.

.NET
Go
Java
Python
TypeScript (