--- name: MyCustomBuildWorkflow description: A custom build workflow to install updates and configure a web server. schemaVersion: 1.0 parameters: - name: BaseImageAMI type: String description: The AMI to use as the base image for the build. - name: WebServerPort type: String description: The port for the web server. default: "80" steps: - name: InstallUpdates action: ExecuteBash inputs: commands: - "sudo yum update -y" - "sudo yum install -y httpd" onFailure: Abort - name: ConfigureWebServer action: ExecuteBash inputs: commands: - "echo 'Hello from Image Builder!' | sudo tee /var/www/html/index.html" - "sudo systemctl enable httpd" - "sudo systemctl start httpd" onFailure: Abort - name: TestWebServer action: ExecuteBash inputs: commands: - "curl localhost:{{ WebServerPort }}" onFailure: Abort outputs: - name: BuiltImageArn value: "{{ image.output.arn }}"