images
Creates, updates, deletes, gets or lists an images resource.
Overview
| Name | images |
| Type | Resource |
| Id | aws.appstream.images |
Fields
The following fields are returned by SELECT queries:
- describe_images
| Name | Datatype | Description |
|---|---|---|
applications | array | The applications associated with the image. |
appstream_agent_version | string | The version of the WorkSpaces Applications agent to use for instances that are launched from this image. |
arn | string | The ARN of the image. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>) |
base_image_arn | string | The ARN of the image from which this image was created. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>) |
created_time | string (date-time) | The time the image was created. |
description | string | The description to display. |
display_name | string | The image name to display. |
dynamic_app_providers_enabled | string | Indicates whether dynamic app providers are enabled within an WorkSpaces Applications image or not. (ENABLED, DISABLED) |
image_builder_name | string | The name of the image builder that was used to create the private image. If the image is shared, copied, or updated by using Managed Image Updates, this value is null. |
image_builder_supported | boolean | Indicates whether an image builder can be launched from this image. |
image_errors | array | Describes the errors that are returned when a new image can't be created. |
image_permissions | object | The permissions to provide to the destination AWS account for the specified image. |
image_shared_with_others | string | Indicates whether the image is shared with another account ID. (TRUE, FALSE) |
image_type | string | The type of the image. Images created through AMI import have type "custom", while WorkSpaces Applications provided images have type "native". Custom images support additional instance types including GeneralPurpose, MemoryOptimized, ComputeOptimized, and Accelerated instance families. (CUSTOM, NATIVE, BYOL) |
latest_appstream_agent_version | string | Indicates whether the image is using the latest WorkSpaces Applications agent version or not. (TRUE, FALSE) |
managed_software_included | boolean | Indicates whether the image includes license-included applications. |
name | string | The name of the image. |
platform | string | The operating system platform of the image. (WINDOWS, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, WINDOWS_SERVER_2025, AMAZON_LINUX2, RHEL8, ROCKY_LINUX8, UBUNTU_PRO_2404) |
public_base_image_released_date | string (date-time) | The release date of the public base image. For private images, this date is the release date of the base image from which the image was created. |
state | string | The image starts in the PENDING state. If image creation succeeds, the state is AVAILABLE. If image creation fails, the state is FAILED. (PENDING, AVAILABLE, FAILED, COPYING, DELETING, CREATING, IMPORTING, VALIDATING) |
state_change_reason | object | The reason why the last state change occurred. |
supported_instance_families | array | The supported instances families that determine which image a customer can use when the customer launches a fleet or image builder. The following instances families are supported: General Purpose Compute Optimized Memory Optimized Graphics G4 Graphics G5 Graphics G6 |
visibility | string | Indicates whether the image is public or private. (PUBLIC, PRIVATE, SHARED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_images | select | region | Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided. Otherwise, all images in the account are described. | |
create_updated_image | insert | region, existingImageName, newImageName | Creates a new image with the latest Windows operating system updates, driver updates, and WorkSpaces Applications agent software. For more information, see the "Update an Image by Using Managed WorkSpaces Applications Image Updates" section in Administer Your WorkSpaces Applications Images, in the Amazon WorkSpaces Applications Administration Guide. | |
create_imported_image | insert | region | Creates a custom WorkSpaces Applications image by importing an EC2 AMI. This allows you to use your own customized AMI to create WorkSpaces Applications images that support additional instance types beyond the standard stream.* instances. | |
delete_image | delete | region | Deletes the specified image. You cannot delete an image when it is in use. After you delete an image, you cannot provision new capacity using the image. | |
start_image_builder | exec | region | Starts the specified image builder. | |
stop_image_builder | exec | region | Stops the specified image builder. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_images
Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided. Otherwise, all images in the account are described.
SELECT
applications,
appstream_agent_version,
arn,
base_image_arn,
created_time,
description,
display_name,
dynamic_app_providers_enabled,
image_builder_name,
image_builder_supported,
image_errors,
image_permissions,
image_shared_with_others,
image_type,
latest_appstream_agent_version,
managed_software_included,
name,
platform,
public_base_image_released_date,
state,
state_change_reason,
supported_instance_families,
visibility
FROM aws.appstream.images
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_updated_image
- create_imported_image
- Manifest
Creates a new image with the latest Windows operating system updates, driver updates, and WorkSpaces Applications agent software. For more information, see the "Update an Image by Using Managed WorkSpaces Applications Image Updates" section in Administer Your WorkSpaces Applications Images, in the Amazon WorkSpaces Applications Administration Guide.
INSERT INTO aws.appstream.images (
existingImageName,
newImageName,
newImageDescription,
newImageDisplayName,
newImageTags,
dryRun,
region
)
SELECT
'{{ existingImageName }}' /* required */,
'{{ newImageName }}' /* required */,
'{{ newImageDescription }}',
'{{ newImageDisplayName }}',
'{{ newImageTags }}',
{{ dryRun }},
'{{ region }}'
RETURNING
can_update_image,
image
;
Creates a custom WorkSpaces Applications image by importing an EC2 AMI. This allows you to use your own customized AMI to create WorkSpaces Applications images that support additional instance types beyond the standard stream.* instances.
INSERT INTO aws.appstream.images (
Name,
SourceAmiId,
WorkspaceImageId,
IamRoleArn,
Description,
DisplayName,
Tags,
RuntimeValidationConfig,
AgentSoftwareVersion,
AppCatalogConfig,
DryRun,
region
)
SELECT
'{{ Name }}',
'{{ SourceAmiId }}',
'{{ WorkspaceImageId }}',
'{{ IamRoleArn }}',
'{{ Description }}',
'{{ DisplayName }}',
'{{ Tags }}',
'{{ RuntimeValidationConfig }}',
'{{ AgentSoftwareVersion }}',
'{{ AppCatalogConfig }}',
{{ DryRun }},
'{{ region }}'
RETURNING
image
;
# Description fields are for documentation purposes
- name: images
props:
- name: region
value: "{{ region }}"
description: Required parameter for the images resource.
- name: existingImageName
value: "{{ existingImageName }}"
description: |
The name of the image to update.
- name: newImageName
value: "{{ newImageName }}"
description: |
The name of the new image. The name must be unique within the AWS account and Region.
- name: newImageDescription
value: "{{ newImageDescription }}"
description: |
The description to display for the new image.
- name: newImageDisplayName
value: "{{ newImageDisplayName }}"
description: |
The name to display for the new image.
- name: newImageTags
value: "{{ newImageTags }}"
description: |
The tags to associate with the new image. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters: _ . : / = + - @ If you do not specify a value, the value is set to an empty string. For more information about tags, see Tagging Your Resources in the Amazon WorkSpaces Applications Administration Guide.
- name: dryRun
value: {{ dryRun }}
description: |
Indicates whether to display the status of image update availability before WorkSpaces Applications initiates the process of creating a new updated image. If this value is set to true, WorkSpaces Applications displays whether image updates are available. If this value is set to false, WorkSpaces Applications initiates the process of creating a new updated image without displaying whether image updates are available.
- name: Name
value: "{{ Name }}"
description: |
A unique name for the imported image. The name must be between 1 and 100 characters and can contain letters, numbers, underscores, periods, and hyphens.
- name: SourceAmiId
value: "{{ SourceAmiId }}"
description: |
The ID of the EC2 AMI to import.
- name: WorkspaceImageId
value: "{{ WorkspaceImageId }}"
description: |
The ID of the Workspaces Image to import.
- name: IamRoleArn
value: "{{ IamRoleArn }}"
description: |
The ARN of the IAM role that allows WorkSpaces Applications to access your AMI. The role must have permissions to modify image attributes and describe images, with a trust relationship allowing appstream.amazonaws.com to assume the role.
- name: Description
value: "{{ Description }}"
description: |
An optional description for the imported image. The description must match approved regex patterns and can be up to 256 characters.
- name: DisplayName
value: "{{ DisplayName }}"
description: |
An optional display name for the imported image. The display name must match approved regex patterns and can be up to 100 characters.
- name: Tags
value: "{{ Tags }}"
description: |
The tags to apply to the imported image. Tags help you organize and manage your WorkSpaces Applications resources.
- name: RuntimeValidationConfig
description: |
Configuration for runtime validation of the imported image. When specified, WorkSpaces Applications provisions an instance to test streaming functionality, which helps ensure the image is suitable for use.
value:
IntendedInstanceType: "{{ IntendedInstanceType }}"
- name: AgentSoftwareVersion
value: "{{ AgentSoftwareVersion }}"
description: |
The version of the WorkSpaces Applications agent to use for the imported image. Choose CURRENT_LATEST to use the agent version available at the time of import, or ALWAYS_LATEST to automatically update to the latest agent version when new versions are released.
valid_values: ['CURRENT_LATEST', 'ALWAYS_LATEST']
- name: AppCatalogConfig
description: |
Configuration for the application catalog of the imported image. This allows you to specify applications available for streaming, including their paths, icons, and launch parameters. This field contains sensitive data.
value:
- Name: "{{ Name }}"
DisplayName: "{{ DisplayName }}"
AbsoluteAppPath: "{{ AbsoluteAppPath }}"
AbsoluteIconPath: "{{ AbsoluteIconPath }}"
AbsoluteManifestPath: "{{ AbsoluteManifestPath }}"
WorkingDirectory: "{{ WorkingDirectory }}"
LaunchParameters: "{{ LaunchParameters }}"
- name: DryRun
value: {{ DryRun }}
description: |
When set to true, performs validation checks without actually creating the imported image. Use this to verify your configuration before executing the actual import operation.
DELETE examples
- delete_image
Deletes the specified image. You cannot delete an image when it is in use. After you delete an image, you cannot provision new capacity using the image.
DELETE FROM aws.appstream.images
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_image_builder
- stop_image_builder
Starts the specified image builder.
EXEC aws.appstream.images.start_image_builder
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"AppstreamAgentVersion": "{{ AppstreamAgentVersion }}"
}'
;
Stops the specified image builder.
EXEC aws.appstream.images.stop_image_builder
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}"
}'
;