distributeImage

Distributes an existing AMI to target Regions and accounts without running the full image build process. This operation only runs the distribution phase on an image that has already been built.

Samples

// The following example distributes an AMI that you own to the targets defined in the specified
// distribution configuration. It returns the ARN of a new Image Builder image resource that you can use with
// GetImage to monitor distribution progress.
val resp = imagebuilderClient.distributeImage {
    sourceImage = "ami-1234567890abcdef0"
    distributionConfigurationArn = "arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution-configuration"
    executionRole = "arn:aws:iam::111122223333:role/aws-service-role/imagebuilder.amazonaws.com/AWSServiceRoleForImageBuilder"
    clientToken = "a1b2c3d4-5678-90ab-cdef-EXAMPLE86420"
}