Update AMI image pipelines from the AWS CLI
To update an AMI image pipeline, use a JSON file as input to the
update-image-pipeline
-
Image pipeline to update
-
Image recipe
-
Infrastructure configuration
-
Distribution settings
You can update an AMI image pipeline with the update-image-pipeline
command in the AWS CLI, or with the Update-EC2IBImagePipeline cmdlet, as
follows:
The update-image-pipeline command and the
Update-EC2IBImagePipeline cmdlet replace the entire
pipeline configuration. You must specify all required properties in the
update request. Include all properties—both properties you want to change
and properties that should stay the same. Properties that you omit are
reset to default values or are removed.
To prevent unintended removal of existing settings, use the get-image-pipeline command to retrieve the current configuration. Then modify only the fields you want to change:
aws imagebuilder get-image-pipeline --image-pipeline-arn arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-pipeline
Use the output as the basis for your update request JSON file.
With Tools for PowerShell, run the Get-EC2IBImagePipeline cmdlet instead:
Get-EC2IBImagePipeline -ImagePipelineArn arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-pipeline
Use the returned values as the basis for the parameters that you pass to the
Update-EC2IBImagePipeline cmdlet.
The update request takes the same image scanning configuration
(imageScanningConfiguration) as the create request, including the scan type
(imageScanningTypes) and the scan result condition
(scanResultCondition). Because the update
replaces the whole configuration, include imageScanningConfiguration in
each update request for a pipeline that scans its images.
For the scanning fields, see Create custom images with Image Builder.
For an example scanning configuration, see Create an AMI image pipeline from the AWS CLI.