arazzo: 1.0.1 info: title: Amazon EC2 Image Builder Assemble Image Pipeline summary: Build a component, image recipe, and infrastructure configuration, then wire them into a new image pipeline. description: >- Stands up a complete EC2 Image Builder pipeline from scratch. The workflow first creates a reusable build component from inline YAML, then creates an image recipe that references that component on top of a parent image, then creates an infrastructure configuration that defines the build environment, and finally creates an image pipeline that ties the recipe and infrastructure configuration together so images can be produced on demand or on a schedule. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: imageBuilderApi url: ../openapi/amazon-ec2-image-builder-openapi.yaml type: openapi workflows: - workflowId: assemble-image-pipeline summary: Create component, image recipe, infrastructure configuration, and image pipeline in sequence. description: >- Chains the four foundational create operations so a brand-new image pipeline is ready to build images. The component ARN feeds the recipe, and the recipe and infrastructure configuration ARNs feed the pipeline. inputs: type: object required: - componentName - componentData - recipeName - parentImage - infrastructureName - instanceProfileName - pipelineName properties: componentName: type: string description: The name of the build component to create. componentData: type: string description: Inline YAML document content that defines the component. platform: type: string description: The operating system platform of the component (Windows or Linux). default: Linux semanticVersion: type: string description: The semantic version to assign to the component and recipe (e.g. 1.0.0). default: 1.0.0 recipeName: type: string description: The name of the image recipe to create. parentImage: type: string description: The base image ARN or AMI ID for the image recipe. infrastructureName: type: string description: The name of the infrastructure configuration to create. instanceProfileName: type: string description: The instance profile to associate with the build instance. pipelineName: type: string description: The name of the image pipeline to create. clientToken: type: string description: An idempotency token reused across the create requests. default: arazzo-assemble-pipeline-0001 steps: - stepId: createComponent description: >- Create a reusable build component from inline YAML document content that can later be referenced by image recipes. operationId: CreateComponent requestBody: contentType: application/json payload: name: $inputs.componentName semanticVersion: $inputs.semanticVersion platform: $inputs.platform data: $inputs.componentData clientToken: $inputs.clientToken successCriteria: - condition: $statusCode == 200 outputs: componentBuildVersionArn: $response.body#/componentBuildVersionArn - stepId: createImageRecipe description: >- Create an image recipe that layers the newly created component on top of the supplied parent image. operationId: CreateImageRecipe requestBody: contentType: application/json payload: name: $inputs.recipeName semanticVersion: $inputs.semanticVersion components: - componentArn: $steps.createComponent.outputs.componentBuildVersionArn parentImage: $inputs.parentImage clientToken: $inputs.clientToken successCriteria: - condition: $statusCode == 200 outputs: imageRecipeArn: $response.body#/imageRecipeArn - stepId: createInfrastructureConfiguration description: >- Create the infrastructure configuration that defines the environment in which images will be built and tested. operationId: CreateInfrastructureConfiguration requestBody: contentType: application/json payload: name: $inputs.infrastructureName instanceProfileName: $inputs.instanceProfileName clientToken: $inputs.clientToken successCriteria: - condition: $statusCode == 200 outputs: infrastructureConfigurationArn: $response.body#/infrastructureConfigurationArn - stepId: createImagePipeline description: >- Create the image pipeline that ties the recipe and infrastructure configuration together so images can be produced. operationId: CreateImagePipeline requestBody: contentType: application/json payload: name: $inputs.pipelineName imageRecipeArn: $steps.createImageRecipe.outputs.imageRecipeArn infrastructureConfigurationArn: $steps.createInfrastructureConfiguration.outputs.infrastructureConfigurationArn clientToken: $inputs.clientToken successCriteria: - condition: $statusCode == 200 outputs: imagePipelineArn: $response.body#/imagePipelineArn outputs: componentBuildVersionArn: $steps.createComponent.outputs.componentBuildVersionArn imageRecipeArn: $steps.createImageRecipe.outputs.imageRecipeArn infrastructureConfigurationArn: $steps.createInfrastructureConfiguration.outputs.infrastructureConfigurationArn imagePipelineArn: $steps.createImagePipeline.outputs.imagePipelineArn