Image - EC2 Image Builder
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Image

An Image Builder image resource that keeps track of all of the settings used to create, configure, and distribute output for that image. An image that Image Builder built from a recipe contains exactly one recipe – either a container recipe (containerRecipe), which creates a container image, or an image recipe (imageRecipe), which creates an AMI. Imported images don't contain a recipe.

Contents

arn

The Amazon Resource Name (ARN) of the image.

Note

Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

  1. Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.

  2. Version ARNs have only the first three nodes: <major>.<minor>.<patch>

  3. Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

Type: String

Pattern: ^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?|third-party):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|lifecycle-policy|workflow\/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+)\.(?:x|[0-9]+)\.(?:x|[0-9]+))(?:/[0-9]+)?)?$

Required: No

buildType

Indicates the type of build that created this image. The build can be initiated in the following ways:

  • USER_INITIATED – A manual pipeline build request.

  • SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.

  • IMPORT – A VM import created the image to use as the base image for the recipe.

  • IMPORT_ISO – An ISO disk import created the image.

Type: String

Valid Values: USER_INITIATED | SCHEDULED | IMPORT | IMPORT_ISO

Required: No

containerRecipe

For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.

Type: ContainerRecipe object

Required: No

dateCreated

The date on which Image Builder created this image.

Type: String

Required: No

deprecationTime

The time when deprecation occurs for an image resource. This can be a past or future date.

Type: Timestamp

Required: No

distributionConfiguration

The distribution configuration that Image Builder used to create this image.

Type: DistributionConfiguration object

Required: No

enhancedImageMetadataEnabled

Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.

Type: Boolean

Required: No

executionRole

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^(?:arn:aws(?:-[a-z]+)*:iam::[0-9]{12}:role/)?[a-zA-Z_0-9+=,.@\-_/]+$

Required: No

imageRecipe

For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.

Type: ImageRecipe object

Required: No

imageScanningConfiguration

Settings for the vulnerability scans that Amazon Inspector runs for this image. For AMI output, Amazon Inspector scans the test instance during image creation. For container output, Amazon Inspector scans the container image in its Amazon ECR repository.

Type: ImageScanningConfiguration object

Required: No

imageSource

The origin of the base image that Image Builder used to build this image.

Type: String

Valid Values: AMAZON_MANAGED | AWS_MARKETPLACE | IMPORTED | CUSTOM

Required: No

imageTestsConfiguration

The image test settings that Image Builder used when it created this image.

Type: ImageTestsConfiguration object

Required: No

infrastructureConfiguration

The infrastructure that Image Builder used to create this image.

Type: InfrastructureConfiguration object

Required: No

lifecycleExecutionId

Identifies the last runtime instance of the lifecycle policy to take action on the image.

Type: String

Pattern: ^lce-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Required: No

loggingConfiguration

The logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation.

Type: ImageLoggingConfiguration object

Required: No

name

The name of the image.

Type: String

Pattern: ^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$

Required: No

osVersion

The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.

Type: String

Length Constraints: Minimum length of 1.

Required: No

outputResources

The output resources that Image Builder produces for this image.

Type: OutputResources object

Required: No

platform

The image operating system platform, such as Linux or Windows.

Type: String

Valid Values: Windows | Linux | macOS

Required: No

scanState

Contains information about the current state of scans for this image.

Type: ImageScanState object

Required: No

sourcePipelineArn

The Amazon Resource Name (ARN) of the image pipeline that created this image. This field is only present for images that a pipeline execution created.

Type: String

Required: No

sourcePipelineName

The name of the image pipeline that created this image. Image Builder doesn't return this field for new images. Use sourcePipelineArn instead.

Type: String

Pattern: ^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$

Required: No

state

The state of the image.

Type: ImageState object

Required: No

tags

The tags that apply to this image.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z0-9\s_.:/=+\-@]*$

Value Length Constraints: Maximum length of 256.

Required: No

type

Specifies whether this image produces an AMI or a container image.

Type: String

Valid Values: AMI | DOCKER

Required: No

version

The semantic version of the image.

Note

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

Type: String

Pattern: ^[0-9]+\.[0-9]+\.[0-9]+(?:/[0-9]+)?$

Required: No

workflows

The build, test, and distribution workflow configurations that are associated with the image.

Type: Array of WorkflowConfiguration objects

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: