interface ImageRecipeProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.ImageRecipeProps |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#ImageRecipeProps |
Java | software.amazon.awscdk.services.imagebuilder.alpha.ImageRecipeProps |
Python | aws_cdk.aws_imagebuilder_alpha.ImageRecipeProps |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป ImageRecipeProps |
Properties for creating an Image Recipe resource.
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')
}
}
]
});
Properties
| Name | Type | Description |
|---|---|---|
| base | Base | The base image for customizations specified in the image recipe. |
| ami | { [string]: string } | The additional tags to assign to the output AMI generated by the build. |
| block | Block[] | The block devices to attach to the instance used for building the image. |
| components? | Component[] | The list of component configurations to apply in the image build. |
| description? | string | The description of the image recipe. |
| image | string | The name of the image recipe. |
| image | string | The version of the image recipe. |
| tags? | { [string]: string } | The tags to apply to the image recipe. |
| uninstall | boolean | Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI. |
| user | User | The user data commands to pass to Image Builder build and test EC2 instances. |
| working | string | The working directory for use during build and test workflows. |
baseImage
Type:
Base
The base image for customizations specified in the image recipe.
amiTags?
Type:
{ [string]: string }
(optional, default: None)
The additional tags to assign to the output AMI generated by the build.
blockDevices?
Type:
Block[]
(optional, default: None)
The block devices to attach to the instance used for building the image.
components?
Type:
Component[]
(optional, default: None)
The list of component configurations to apply in the image build.
description?
Type:
string
(optional, default: None)
The description of the image recipe.
imageRecipeName?
Type:
string
(optional, default: a name is generated)
The name of the image recipe.
imageRecipeVersion?
Type:
string
(optional, default: 1.0.x)
The version of the image recipe.
tags?
Type:
{ [string]: string }
(optional, default: None)
The tags to apply to the image recipe.
uninstallSsmAgentAfterBuild?
Type:
boolean
(optional, default: this is false if the Systems Manager agent is pre-installed on the base image. Otherwise, this is true.)
Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI.
userDataOverride?
Type:
User
(optional, default: None)
The user data commands to pass to Image Builder build and test EC2 instances.
For Linux and macOS, Image Builder uses a default user data script to install the Systems Manager agent. If you override the user data, you must ensure to add commands to install Systems Manager agent, if it is not pre-installed on your base image.
workingDirectory?
Type:
string
(optional, default: the Image Builder default working directory is used. For Linux and macOS builds, this would be /tmp. For
Windows builds, this would be C:/)
The working directory for use during build and test workflows.

.NET
Go
Java
Python
TypeScript (