Skip to content

ImagePipeline

Source: src/AWS/ImageBuilder/ImagePipeline.ts

An EC2 Image Builder image pipeline — wires a recipe to an infrastructure configuration (and optionally a distribution configuration) and automates image builds on a schedule or on demand.

Creating the pipeline does not start a build; builds start on the configured schedule or when explicitly invoked.

Manual-Only Pipeline

const pipeline = yield* ImageBuilder.ImagePipeline("Pipeline", {
imageRecipeArn: recipe.imageRecipeArn,
infrastructureConfigurationArn: infra.infrastructureConfigurationArn,
status: "DISABLED",
});

Scheduled Pipeline with Distribution

const pipeline = yield* ImageBuilder.ImagePipeline("Nightly", {
imageRecipeArn: recipe.imageRecipeArn,
infrastructureConfigurationArn: infra.infrastructureConfigurationArn,
distributionConfigurationArn: distribution.distributionConfigurationArn,
schedule: {
scheduleExpression: "cron(0 9 * * ? *)",
pipelineExecutionStartCondition:
"EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE",
},
});