2026/11/20 - Lambda MicroVMs - 7 updated api methods
Changes AWS Lambda MicroVMs now supports customer managed keys (CMK) in AWS Key Management Service (AWS KMS), enabling you to encrypt Lambda MicroVM data at rest using keys you control.
{'kmsKeyIdentifier': 'string'}
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.
See also: AWS API Documentation
Request Syntax
client.create_microvm_image(
baseImageArn='string',
baseImageVersion='string',
buildRoleArn='string',
description='string',
codeArtifact={
'uri': 'string'
},
logging={
'disabled': {}
,
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
egressNetworkConnectors=[
'string',
],
cpuConfigurations=[
{
'architecture': 'ARM_64'|'X86_64'
},
],
resources=[
{
'minimumMemoryInMiB': 123
},
],
additionalOsCapabilities=[
'ALL',
],
hooks={
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
environmentVariables={
'string': 'string'
},
kmsKeyIdentifier='string',
name='string',
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
The ARN of the Lambda-managed base MicroVM image to build upon. Use ListManagedMicrovmImages to discover available base images.
string
The specific version of the base MicroVM image to use.
string
[REQUIRED]
The ARN of the IAM role assumed during the image build process. This role must have permissions to access the code artifact and any required resources.
string
A description of the MicroVM image.
dict
[REQUIRED]
The code artifact containing the application code and metadata for the MicroVM image.
uri (string) --
The URI of the code artifact in Amazon S3.
dict
The logging configuration for build-time and runtime logs. Specify {"cloudWatch": {"logGroup": "..."}} to stream logs to a custom CloudWatch log group, or {"disabled": {}} to turn off logging.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
list
The list of egress network connectors available to the MicroVM at image build time.
(string) --
list
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) -- [REQUIRED]
The CPU architecture.
list
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) -- [REQUIRED]
The minimum amount of memory in MiB to allocate to the MicroVM.
list
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
dict
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
dict
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
string
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. You must have permission to use the key. Specify the key in one of the following formats:
Key ARN
Alias ARN
If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
string
[REQUIRED]
The name of the MicroVM image. Must be unique within the AWS account.
dict
A 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.
(string) --
(string) --
string
A unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token, the operation returns the successful response without performing any further actions.
This field is autopopulated if not provided.
dict
Response Syntax
{
'imageArn': 'string',
'name': 'string',
'state': 'CREATING'|'CREATED'|'CREATE_FAILED'|'UPDATING'|'UPDATED'|'UPDATE_FAILED'|'DELETING'|'DELETE_FAILED'|'DELETED',
'latestActiveImageVersion': 'string',
'latestFailedImageVersion': 'string',
'createdAt': datetime(2015, 1, 1),
'baseImageArn': 'string',
'baseImageVersion': 'string',
'buildRoleArn': 'string',
'description': 'string',
'codeArtifact': {
'uri': 'string'
},
'logging': {
'disabled': {},
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
'egressNetworkConnectors': [
'string',
],
'cpuConfigurations': [
{
'architecture': 'ARM_64'|'X86_64'
},
],
'resources': [
{
'minimumMemoryInMiB': 123
},
],
'additionalOsCapabilities': [
'ALL',
],
'hooks': {
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
'environmentVariables': {
'string': 'string'
},
'kmsKeyIdentifier': 'string',
'tags': {
'string': 'string'
},
'updatedAt': datetime(2015, 1, 1),
'imageVersion': 'string'
}
Response Structure
(dict) --
imageArn (string) --
The ARN of the created MicroVM image.
name (string) --
The name of the MicroVM image.
state (string) --
The current state of the MicroVM image.
latestActiveImageVersion (string) --
The latest active version of the MicroVM image.
latestFailedImageVersion (string) --
The latest failed version of the MicroVM image, if any.
createdAt (datetime) --
The timestamp when the MicroVM image was created.
baseImageArn (string) --
The ARN of the base MicroVM image.
baseImageVersion (string) --
The specific version of the base MicroVM image.
buildRoleArn (string) --
The ARN of the IAM build role.
description (string) --
The description of the MicroVM image.
codeArtifact (dict) --
The code artifact containing the application code and metadata for the MicroVM image.
uri (string) --
The URI of the code artifact in Amazon S3.
logging (dict) --
The logging configuration for build-time and runtime logs. Specify {"cloudWatch": {"logGroup": "..."}} to stream logs to a custom CloudWatch log group, or {"disabled": {}} to turn off logging.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at image build time.
(string) --
cpuConfigurations (list) --
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) --
The CPU architecture.
resources (list) --
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) --
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) --
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
hooks (dict) --
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) --
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
tags (dict) --
A 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.
(string) --
(string) --
updatedAt (datetime) --
The timestamp when the MicroVM image was last updated.
imageVersion (string) --
The version of the MicroVM image.
{'kmsKeyIdentifier': 'string'}
Retrieves the details of a specific MicroVM, including its state, endpoint, image information, and configuration. The state field is eventually consistent — determine readiness by connecting to the endpoint.
See also: AWS API Documentation
Request Syntax
client.get_microvm(
microvmIdentifier='string'
)
string
[REQUIRED]
The ID of the MicroVM to retrieve.
dict
Response Syntax
{
'microvmId': 'string',
'state': 'PENDING'|'RUNNING'|'SUSPENDING'|'SUSPENDED'|'TERMINATING'|'TERMINATED',
'endpoint': 'string',
'imageArn': 'string',
'imageVersion': 'string',
'executionRoleArn': 'string',
'idlePolicy': {
'maxIdleDurationSeconds': 123,
'suspendedDurationSeconds': 123,
'autoResumeEnabled': True|False
},
'maximumDurationInSeconds': 123,
'startedAt': datetime(2015, 1, 1),
'terminatedAt': datetime(2015, 1, 1),
'stateReason': 'string',
'kmsKeyIdentifier': 'string',
'ingressNetworkConnectors': [
'string',
],
'egressNetworkConnectors': [
'string',
]
}
Response Structure
(dict) --
microvmId (string) --
The unique identifier of the MicroVM.
state (string) --
The current lifecycle state of the MicroVM.
endpoint (string) --
The HTTPS endpoint URL for communicating with the MicroVM. Include a valid authentication token in the X-aws-proxy-auth header when sending requests.
imageArn (string) --
The ARN of the MicroVM image used to run this MicroVM.
imageVersion (string) --
The version of the MicroVM image used to run this MicroVM.
executionRoleArn (string) --
The ARN of the IAM execution role assumed by the MicroVM.
idlePolicy (dict) --
The idle policy configuration of the MicroVM, controlling auto-suspend and auto-resume behavior.
maxIdleDurationSeconds (integer) --
The maximum time in seconds that a MicroVM can remain idle before it is automatically suspended.
suspendedDurationSeconds (integer) --
The maximum time in seconds that a MicroVM can remain suspended before it is automatically terminated.
autoResumeEnabled (boolean) --
Indicates whether the MicroVM automatically resumes when it receives a request while suspended.
maximumDurationInSeconds (integer) --
The maximum duration in seconds that the MicroVM can exist before being terminated by the platform.
startedAt (datetime) --
The timestamp when the MicroVM first started.
terminatedAt (datetime) --
The timestamp when the MicroVM terminated.
stateReason (string) --
The reason for why the MicroVM is in the current state.
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts your MicroVM configuration at rest. If you don't specify a key, your MicroVM uses an Amazon Web Services owned key.
ingressNetworkConnectors (list) --
The list of ingress network connectors configured for the MicroVM.
(string) --
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at runtime.
(string) --
{'kmsKeyIdentifier': 'string'}
Retrieves the details of a specific version of a MicroVM image, including its configuration, state, and build information.
See also: AWS API Documentation
Request Syntax
client.get_microvm_image_version(
imageIdentifier='string',
imageVersion='string'
)
string
[REQUIRED]
The unique identifier (ARN or ID) of the MicroVM image.
string
[REQUIRED]
The version of the MicroVM image to retrieve.
dict
Response Syntax
{
'baseImageArn': 'string',
'baseImageVersion': 'string',
'buildRoleArn': 'string',
'description': 'string',
'codeArtifact': {
'uri': 'string'
},
'logging': {
'disabled': {},
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
'egressNetworkConnectors': [
'string',
],
'cpuConfigurations': [
{
'architecture': 'ARM_64'|'X86_64'
},
],
'resources': [
{
'minimumMemoryInMiB': 123
},
],
'additionalOsCapabilities': [
'ALL',
],
'hooks': {
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
'environmentVariables': {
'string': 'string'
},
'kmsKeyIdentifier': 'string',
'imageArn': 'string',
'imageVersion': 'string',
'state': 'PENDING'|'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'DELETING'|'DELETED'|'DELETE_FAILED',
'status': 'ACTIVE'|'INACTIVE',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'stateReason': 'string',
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
baseImageArn (string) --
The ARN of the base MicroVM image used.
baseImageVersion (string) --
The specific version of the base MicroVM image.
buildRoleArn (string) --
The ARN of the IAM build role.
description (string) --
The description of the version.
codeArtifact (dict) --
The code artifact for this version.
uri (string) --
The URI of the code artifact in Amazon S3.
logging (dict) --
The logging configuration for this version.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at image build time.
(string) --
cpuConfigurations (list) --
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) --
The CPU architecture.
resources (list) --
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) --
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) --
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
hooks (dict) --
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) --
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
imageArn (string) --
The ARN of the MicroVM image.
imageVersion (string) --
The version of the MicroVM image.
state (string) --
The current state of the version.
status (string) --
The availability status of the version: ACTIVE (can be used by RunMicrovm) or INACTIVE (blocked from launching new MicroVMs).
createdAt (datetime) --
The timestamp when the version was created.
updatedAt (datetime) --
The timestamp when the version was last updated.
stateReason (string) --
The reason for the current state. For example, one or more builds failed.
tags (dict) --
Key-value pairs associated with the version.
(string) --
(string) --
{'items': {'kmsKeyIdentifier': 'string'}}
Lists versions of a MicroVM image. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
client.list_microvm_image_versions(
maxResults=123,
nextToken='string',
imageIdentifier='string'
)
integer
The maximum number of results to return in a single call.
string
The pagination token from a previous call. Use this token to retrieve the next page of results.
string
[REQUIRED]
The unique identifier (ARN or ID) of the MicroVM image to list versions for.
dict
Response Syntax
{
'nextToken': 'string',
'items': [
{
'baseImageArn': 'string',
'baseImageVersion': 'string',
'buildRoleArn': 'string',
'description': 'string',
'codeArtifact': {
'uri': 'string'
},
'logging': {
'disabled': {},
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
'egressNetworkConnectors': [
'string',
],
'cpuConfigurations': [
{
'architecture': 'ARM_64'|'X86_64'
},
],
'resources': [
{
'minimumMemoryInMiB': 123
},
],
'additionalOsCapabilities': [
'ALL',
],
'hooks': {
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
'environmentVariables': {
'string': 'string'
},
'kmsKeyIdentifier': 'string',
'imageArn': 'string',
'imageVersion': 'string',
'state': 'PENDING'|'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'DELETING'|'DELETED'|'DELETE_FAILED',
'status': 'ACTIVE'|'INACTIVE',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'stateReason': 'string',
'tags': {
'string': 'string'
}
},
]
}
Response Structure
(dict) --
nextToken (string) --
The pagination token to use in a subsequent request to retrieve the next page of results. This value is null when there are no more results to return.
items (list) --
The list of MicroVM image versions.
(dict) --
Contains summary information about a version of a MicroVM image.
baseImageArn (string) --
The ARN of the base MicroVM image used.
baseImageVersion (string) --
The specific version of the base MicroVM image.
buildRoleArn (string) --
The ARN of the IAM build role.
description (string) --
The description of the version.
codeArtifact (dict) --
The code artifact for this version.
uri (string) --
The URI of the code artifact in Amazon S3.
logging (dict) --
The logging configuration for this version.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at image build time.
(string) --
cpuConfigurations (list) --
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) --
The CPU architecture.
resources (list) --
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) --
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) --
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
hooks (dict) --
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) --
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
imageArn (string) --
The ARN of the MicroVM image.
imageVersion (string) --
The version of the MicroVM image.
state (string) --
The current state of the version.
status (string) --
The availability status of the version: ACTIVE (can be used by RunMicrovm) or INACTIVE (blocked from launching new MicroVMs).
createdAt (datetime) --
The timestamp when the version was created.
updatedAt (datetime) --
The timestamp when the version was last updated.
stateReason (string) --
The reason for the current state. For example, one or more builds failed.
tags (dict) --
Key-value pairs associated with the version.
(string) --
(string) --
{'kmsKeyIdentifier': 'string'}
Runs a new MicroVM from the specified image. The MicroVM starts in PENDING state and transitions to RUNNING once provisioning completes. To connect, generate an authentication token using CreateMicrovmAuthToken.
See also: AWS API Documentation
Request Syntax
client.run_microvm(
ingressNetworkConnectors=[
'string',
],
egressNetworkConnectors=[
'string',
],
imageIdentifier='string',
imageVersion='string',
executionRoleArn='string',
idlePolicy={
'maxIdleDurationSeconds': 123,
'suspendedDurationSeconds': 123,
'autoResumeEnabled': True|False
},
logging={
'disabled': {}
,
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
kmsKeyIdentifier='string',
runHookPayload='string',
maximumDurationInSeconds=123,
clientToken='string'
)
list
The list of ingress network connectors to configure for the MicroVM.
(string) --
list
The list of egress network connectors available to the MicroVM at runtime.
(string) --
string
[REQUIRED]
The identifier (ARN or ID) of the MicroVM image to run.
string
The version of the MicroVM image to run.
string
The ARN of the IAM role to be assumed by the MicroVM during execution.
dict
Configuration to control auto-suspend and auto-resume behavior.
maxIdleDurationSeconds (integer) -- [REQUIRED]
The maximum time in seconds that a MicroVM can remain idle before it is automatically suspended.
suspendedDurationSeconds (integer) -- [REQUIRED]
The maximum time in seconds that a MicroVM can remain suspended before it is automatically terminated.
autoResumeEnabled (boolean) -- [REQUIRED]
Indicates whether the MicroVM automatically resumes when it receives a request while suspended.
dict
The logging configuration for this MicroVM instance. Specify {"cloudWatch": {"logGroup": "..."}} to stream application logs to a custom CloudWatch log group, or {"disabled": {}} to turn off logging.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
string
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts your MicroVM configuration at rest. To use this operation, you must have permission to use the key. Specify the key ARN or the alias ARN.
If you don't specify a key, your MicroVM uses an Amazon Web Services owned key.
string
Per-MicroVM initialization data delivered as the request body of the /run lifecycle hook. Use to pass tenant-specific configuration such as session IDs or secret references. Maximum: 16,384 bytes.
integer
The maximum duration in seconds that the MicroVM can exist before being terminated by the platform. Valid range: 1–28,800 (8 hours).
string
A unique, case-sensitive identifier you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
Response Syntax
{
'microvmId': 'string',
'state': 'PENDING'|'RUNNING'|'SUSPENDING'|'SUSPENDED'|'TERMINATING'|'TERMINATED',
'endpoint': 'string',
'imageArn': 'string',
'imageVersion': 'string',
'executionRoleArn': 'string',
'idlePolicy': {
'maxIdleDurationSeconds': 123,
'suspendedDurationSeconds': 123,
'autoResumeEnabled': True|False
},
'maximumDurationInSeconds': 123,
'startedAt': datetime(2015, 1, 1),
'terminatedAt': datetime(2015, 1, 1),
'stateReason': 'string',
'kmsKeyIdentifier': 'string',
'ingressNetworkConnectors': [
'string',
],
'egressNetworkConnectors': [
'string',
]
}
Response Structure
(dict) --
microvmId (string) --
The unique identifier of the MicroVM.
state (string) --
The current lifecycle state of the MicroVM.
endpoint (string) --
The HTTPS endpoint URL for communicating with the MicroVM. Include a valid authentication token in the X-aws-proxy-auth header when sending requests.
imageArn (string) --
The ARN of the MicroVM image used to run this MicroVM.
imageVersion (string) --
The version of the MicroVM image used to run this MicroVM.
executionRoleArn (string) --
The ARN of the IAM execution role assumed by the MicroVM.
idlePolicy (dict) --
The idle policy configuration of the MicroVM.
maxIdleDurationSeconds (integer) --
The maximum time in seconds that a MicroVM can remain idle before it is automatically suspended.
suspendedDurationSeconds (integer) --
The maximum time in seconds that a MicroVM can remain suspended before it is automatically terminated.
autoResumeEnabled (boolean) --
Indicates whether the MicroVM automatically resumes when it receives a request while suspended.
maximumDurationInSeconds (integer) --
The maximum duration in seconds that the MicroVM can exist.
startedAt (datetime) --
The timestamp when the MicroVM first started.
terminatedAt (datetime) --
The timestamp when the MicroVM terminated.
stateReason (string) --
The reason for why the MicroVM is in the current state.
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts your MicroVM configuration at rest. If you don't specify a key, your MicroVM uses an Amazon Web Services owned key.
ingressNetworkConnectors (list) --
The list of ingress network connectors configured for the MicroVM.
(string) --
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at runtime.
(string) --
{'kmsKeyIdentifier': 'string'}
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.
See also: AWS API Documentation
Request Syntax
client.update_microvm_image(
baseImageArn='string',
baseImageVersion='string',
buildRoleArn='string',
description='string',
codeArtifact={
'uri': 'string'
},
logging={
'disabled': {}
,
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
egressNetworkConnectors=[
'string',
],
cpuConfigurations=[
{
'architecture': 'ARM_64'|'X86_64'
},
],
resources=[
{
'minimumMemoryInMiB': 123
},
],
additionalOsCapabilities=[
'ALL',
],
hooks={
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
environmentVariables={
'string': 'string'
},
kmsKeyIdentifier='string',
imageIdentifier='string',
clientToken='string'
)
string
[REQUIRED]
The ARN of the base MicroVM image.
string
The specific version of the base MicroVM image to use.
string
[REQUIRED]
The ARN of the IAM build role.
string
The description of the MicroVM image.
dict
[REQUIRED]
The code artifact containing the application code and metadata for the MicroVM image.
uri (string) --
The URI of the code artifact in Amazon S3.
dict
The logging configuration for build-time and runtime logs. Specify {"cloudWatch": {"logGroup": "..."}} to stream logs to a custom CloudWatch log group, or {"disabled": {}} to turn off logging.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
list
The list of egress network connectors available to the MicroVM at image build time.
(string) --
list
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) -- [REQUIRED]
The CPU architecture.
list
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) -- [REQUIRED]
The minimum amount of memory in MiB to allocate to the MicroVM.
list
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
dict
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
dict
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
string
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. You must have permission to use the key. Specify the key in one of the following formats:
Key ARN
Alias ARN
If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
string
[REQUIRED]
The unique identifier (ARN or ID) of the MicroVM image to update.
string
A unique, case-sensitive identifier you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
Response Syntax
{
'imageArn': 'string',
'name': 'string',
'state': 'CREATING'|'CREATED'|'CREATE_FAILED'|'UPDATING'|'UPDATED'|'UPDATE_FAILED'|'DELETING'|'DELETE_FAILED'|'DELETED',
'latestActiveImageVersion': 'string',
'latestFailedImageVersion': 'string',
'createdAt': datetime(2015, 1, 1),
'baseImageArn': 'string',
'baseImageVersion': 'string',
'buildRoleArn': 'string',
'description': 'string',
'codeArtifact': {
'uri': 'string'
},
'logging': {
'disabled': {},
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
'egressNetworkConnectors': [
'string',
],
'cpuConfigurations': [
{
'architecture': 'ARM_64'|'X86_64'
},
],
'resources': [
{
'minimumMemoryInMiB': 123
},
],
'additionalOsCapabilities': [
'ALL',
],
'hooks': {
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
'environmentVariables': {
'string': 'string'
},
'kmsKeyIdentifier': 'string',
'updatedAt': datetime(2015, 1, 1),
'imageVersion': 'string'
}
Response Structure
(dict) --
imageArn (string) --
The ARN of the MicroVM image.
name (string) --
The name of the MicroVM image.
state (string) --
The current state of the MicroVM image.
latestActiveImageVersion (string) --
The latest active version of the MicroVM image.
latestFailedImageVersion (string) --
The latest failed version of the MicroVM image, if any.
createdAt (datetime) --
The timestamp when the MicroVM image was created.
baseImageArn (string) --
The ARN of the base MicroVM image.
baseImageVersion (string) --
The specific version of the base MicroVM image.
buildRoleArn (string) --
The ARN of the IAM build role.
description (string) --
The description of the MicroVM image.
codeArtifact (dict) --
The code artifact containing the application code and metadata for the MicroVM image.
uri (string) --
The URI of the code artifact in Amazon S3.
logging (dict) --
The logging configuration for build-time and runtime logs. Specify {"cloudWatch": {"logGroup": "..."}} to stream logs to a custom CloudWatch log group, or {"disabled": {}} to turn off logging.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at image build time.
(string) --
cpuConfigurations (list) --
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) --
The CPU architecture.
resources (list) --
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) --
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) --
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
hooks (dict) --
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) --
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
updatedAt (datetime) --
The timestamp when the MicroVM image was last updated.
imageVersion (string) --
The version of the MicroVM image.
{'kmsKeyIdentifier': 'string'}
Updates the status of a specific MicroVM image version.
See also: AWS API Documentation
Request Syntax
client.update_microvm_image_version(
imageIdentifier='string',
imageVersion='string',
status='ACTIVE'|'INACTIVE'
)
string
[REQUIRED]
The unique identifier (ARN or ID) of the MicroVM image.
string
[REQUIRED]
The version of the MicroVM image to update.
string
[REQUIRED]
The new status to set for the MicroVM image version.
dict
Response Syntax
{
'baseImageArn': 'string',
'baseImageVersion': 'string',
'buildRoleArn': 'string',
'description': 'string',
'codeArtifact': {
'uri': 'string'
},
'logging': {
'disabled': {},
'cloudWatch': {
'logGroup': 'string',
'logStream': 'string'
}
},
'egressNetworkConnectors': [
'string',
],
'cpuConfigurations': [
{
'architecture': 'ARM_64'|'X86_64'
},
],
'resources': [
{
'minimumMemoryInMiB': 123
},
],
'additionalOsCapabilities': [
'ALL',
],
'hooks': {
'port': 123,
'microvmHooks': {
'run': 'DISABLED'|'ENABLED',
'runTimeoutInSeconds': 123,
'resume': 'DISABLED'|'ENABLED',
'resumeTimeoutInSeconds': 123,
'suspend': 'DISABLED'|'ENABLED',
'suspendTimeoutInSeconds': 123,
'terminate': 'DISABLED'|'ENABLED',
'terminateTimeoutInSeconds': 123
},
'microvmImageHooks': {
'ready': 'DISABLED'|'ENABLED',
'readyTimeoutInSeconds': 123,
'validate': 'DISABLED'|'ENABLED',
'validateTimeoutInSeconds': 123
}
},
'environmentVariables': {
'string': 'string'
},
'kmsKeyIdentifier': 'string',
'imageArn': 'string',
'imageVersion': 'string',
'state': 'PENDING'|'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'DELETING'|'DELETED'|'DELETE_FAILED',
'status': 'ACTIVE'|'INACTIVE',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'stateReason': 'string',
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
baseImageArn (string) --
The ARN of the base MicroVM image used.
baseImageVersion (string) --
The specific version of the base MicroVM image.
buildRoleArn (string) --
The ARN of the IAM build role.
description (string) --
The description of the version.
codeArtifact (dict) --
The code artifact for this version.
uri (string) --
The URI of the code artifact in Amazon S3.
logging (dict) --
The logging configuration for this version.
disabled (dict) --
Specifies that logging is disabled.
cloudWatch (dict) --
Configuration for sending logs to Amazon CloudWatch Logs.
logGroup (string) --
The name of the CloudWatch Logs log group to send logs to.
logStream (string) --
The name of the CloudWatch Logs log stream within the log group.
egressNetworkConnectors (list) --
The list of egress network connectors available to the MicroVM at image build time.
(string) --
cpuConfigurations (list) --
The list of supported CPU configurations for the MicroVM.
(dict) --
Configuration for the CPU architecture of a MicroVM.
architecture (string) --
The CPU architecture.
resources (list) --
The resource requirements for the MicroVM.
(dict) --
Resource requirements for a MicroVM.
minimumMemoryInMiB (integer) --
The minimum amount of memory in MiB to allocate to the MicroVM.
additionalOsCapabilities (list) --
Additional OS capabilities granted to the MicroVM runtime environment.
(string) --
Capability granted to the application when booted
hooks (dict) --
Lifecycle hook configuration for MicroVMs and MicroVM images.
port (integer) --
The port number on which the hooks listener runs.
microvmHooks (dict) --
The lifecycle hooks for MicroVM events.
run (string) --
The path of the hook invoked when the MicroVM starts running.
runTimeoutInSeconds (integer) --
The maximum time in seconds for the run hook to complete.
resume (string) --
The path of the hook invoked when the MicroVM resumes from a suspended state.
resumeTimeoutInSeconds (integer) --
The maximum time in seconds for the resume hook to complete.
suspend (string) --
The path of the hook invoked when the MicroVM is suspended.
suspendTimeoutInSeconds (integer) --
The maximum time in seconds for the suspend hook to complete.
terminate (string) --
The path of the hook invoked when the MicroVM is terminated.
terminateTimeoutInSeconds (integer) --
The maximum time in seconds for the terminate hook to complete.
microvmImageHooks (dict) --
The hooks for MicroVM image build events.
ready (string) --
The path of the hook invoked when the MicroVM image build is ready.
readyTimeoutInSeconds (integer) --
The maximum time in seconds for the ready hook to complete.
validate (string) --
The path of the hook invoked to validate the MicroVM image build.
validateTimeoutInSeconds (integer) --
The maximum time in seconds for the validate hook to complete.
environmentVariables (dict) --
Environment variables set in the MicroVM runtime environment.
(string) --
(string) --
kmsKeyIdentifier (string) --
The customer managed Amazon Web Services Key Management Service (Amazon Web Services KMS) key that encrypts the contents and metadata of your MicroVM image version. If you don't specify a key, your MicroVM image version uses an Amazon Web Services owned key.
imageArn (string) --
The ARN of the MicroVM image.
imageVersion (string) --
The version of the MicroVM image.
state (string) --
The current state of the version.
status (string) --
The availability status of the version: ACTIVE (can be used by RunMicrovm) or INACTIVE (blocked from launching new MicroVMs).
createdAt (datetime) --
The timestamp when the version was created.
updatedAt (datetime) --
The timestamp when the version was last updated.
stateReason (string) --
The reason for the current state. For example, one or more builds failed.
tags (dict) --
Key-value pairs associated with the version.
(string) --
(string) --