Skip to main content

microvm_images

Creates, updates, deletes, gets or lists a microvm_images resource.

Overview

Namemicrovm_images
TypeResource
Idaws.lambda_microvms.microvm_images

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringName of a MicroVM image. (pattern: <code>[a-zA-Z0-9-_]+</code>)
created_atstring (date-time)The timestamp when the MicroVM image was created.
image_arnstringA string which is not empty or blank (only whitespace). (pattern: <code>[^\s]+</code>)
latest_active_image_versionstringA string which is not empty or blank (only whitespace). (pattern: <code>[^\s]+</code>)
latest_failed_image_versionstringA string which is not empty or blank (only whitespace). (pattern: <code>[^\s]+</code>)
statestringThe current state of the MicroVM image. (CREATING, CREATED, CREATE_FAILED, UPDATING, UPDATED, UPDATE_FAILED, DELETING, DELETE_FAILED, DELETED)
tagsobjectA set of key-value pairs that you can attach to the resource. Use tags to categorize resources for cost allocation, access control (ABAC), and organization.
updated_atstring (date-time)The timestamp when the MicroVM image was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_microvm_imageselectimage_identifier, regionRetrieves the details of a MicroVM image, including its state, versions, and configuration.
list_microvm_imagesselectregionmaxResults, nextToken, nameFilterLists MicroVM images in the account with optional name filtering. We recommend using pagination to ensure that the operation returns quickly and successfully.
create_microvm_imageinsertregion, baseImageArn, buildRoleArn, codeArtifact, nameCreates a MicroVM image from the specified code artifact and base image. The build is asynchronous — the image transitions from CREATING to CREATED on success, or CREATE_FAILED on failure. Use GetMicrovmImage to poll for completion.
update_microvm_imageupdateimage_identifier, region, baseImageArn, buildRoleArn, codeArtifactUpdates the configuration of a MicroVM image and triggers a new version build. This operation uses PUT semantics — all required fields (codeArtifact, baseImageArn, buildRoleArn) must be provided with every request.
delete_microvm_imagedeleteimage_identifier, regionDeletes a MicroVM image. This operation is idempotent; deleting an image that has already been deleted succeeds without error.

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.

NameDatatypeDescription
image_identifierstringThe unique identifier (ARN or ID) of the MicroVM image to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in a single call.
nameFilterstringFilters images whose name contains the specified string.
nextTokenstringThe pagination token from a previous call. Use this token to retrieve the next page of results.

SELECT examples

Retrieves the details of a MicroVM image, including its state, versions, and configuration.

SELECT
name,
created_at,
image_arn,
latest_active_image_version,
latest_failed_image_version,
state,
tags,
updated_at
FROM aws.lambda_microvms.microvm_images
WHERE image_identifier = '{{ image_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a MicroVM image from the specified code artifact and base image. The build is asynchronous — the image transitions from CREATING to CREATED on success, or CREATE_FAILED on failure. Use GetMicrovmImage to poll for completion.

INSERT INTO aws.lambda_microvms.microvm_images (
baseImageArn,
baseImageVersion,
buildRoleArn,
description,
codeArtifact,
logging,
egressNetworkConnectors,
cpuConfigurations,
resources,
additionalOsCapabilities,
hooks,
environmentVariables,
name,
tags,
clientToken,
region
)
SELECT
'{{ baseImageArn }}' /* required */,
'{{ baseImageVersion }}',
'{{ buildRoleArn }}' /* required */,
'{{ description }}',
'{{ codeArtifact }}' /* required */,
'{{ logging }}',
'{{ egressNetworkConnectors }}',
'{{ cpuConfigurations }}',
'{{ resources }}',
'{{ additionalOsCapabilities }}',
'{{ hooks }}',
'{{ environmentVariables }}',
'{{ name }}' /* required */,
'{{ tags }}',
'{{ clientToken }}',
'{{ region }}'
RETURNING
name,
additional_os_capabilities,
base_image_arn,
base_image_version,
build_role_arn,
code_artifact,
cpu_configurations,
created_at,
description,
egress_network_connectors,
environment_variables,
hooks,
image_arn,
image_version,
latest_active_image_version,
latest_failed_image_version,
logging,
resources,
state,
tags,
updated_at
;

UPDATE examples

Updates the configuration of a MicroVM image and triggers a new version build. This operation uses PUT semantics — all required fields (codeArtifact, baseImageArn, buildRoleArn) must be provided with every request.

UPDATE aws.lambda_microvms.microvm_images
SET
baseImageArn = '{{ baseImageArn }}',
baseImageVersion = '{{ baseImageVersion }}',
buildRoleArn = '{{ buildRoleArn }}',
description = '{{ description }}',
codeArtifact = '{{ codeArtifact }}',
logging = '{{ logging }}',
egressNetworkConnectors = '{{ egressNetworkConnectors }}',
cpuConfigurations = '{{ cpuConfigurations }}',
resources = '{{ resources }}',
additionalOsCapabilities = '{{ additionalOsCapabilities }}',
hooks = '{{ hooks }}',
environmentVariables = '{{ environmentVariables }}',
clientToken = '{{ clientToken }}'
WHERE
image_identifier = '{{ image_identifier }}' --required
AND region = '{{ region }}' --required
AND baseImageArn = '{{ baseImageArn }}' --required
AND buildRoleArn = '{{ buildRoleArn }}' --required
AND codeArtifact = '{{ codeArtifact }}' --required
RETURNING
name,
additional_os_capabilities,
base_image_arn,
base_image_version,
build_role_arn,
code_artifact,
cpu_configurations,
created_at,
description,
egress_network_connectors,
environment_variables,
hooks,
image_arn,
image_version,
latest_active_image_version,
latest_failed_image_version,
logging,
resources,
state,
updated_at;

DELETE examples

Deletes a MicroVM image. This operation is idempotent; deleting an image that has already been deleted succeeds without error.

DELETE FROM aws.lambda_microvms.microvm_images
WHERE image_identifier = '{{ image_identifier }}' --required
AND region = '{{ region }}' --required
;