published on Friday, May 29, 2026 by Pulumi
published on Friday, May 29, 2026 by Pulumi
Use this data source to get the ID of a registered AMI for use in other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getAmi({
executableUsers: ["self"],
mostRecent: true,
nameRegex: "^myami-[0-9]{3}",
owners: ["self"],
filters: [
{
name: "name",
values: ["myami-*"],
},
{
name: "root-device-type",
values: ["ebs"],
},
{
name: "virtualization-type",
values: ["hvm"],
},
],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_ami(executable_users=["self"],
most_recent=True,
name_regex="^myami-[0-9]{3}",
owners=["self"],
filters=[
{
"name": "name",
"values": ["myami-*"],
},
{
"name": "root-device-type",
"values": ["ebs"],
},
{
"name": "virtualization-type",
"values": ["hvm"],
},
])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
ExecutableUsers: []string{
"self",
},
MostRecent: pulumi.BoolRef(true),
NameRegex: pulumi.StringRef("^myami-[0-9]{3}"),
Owners: []string{
"self",
},
Filters: []ec2.GetAmiFilter{
{
Name: "name",
Values: []string{
"myami-*",
},
},
{
Name: "root-device-type",
Values: []string{
"ebs",
},
},
{
Name: "virtualization-type",
Values: []string{
"hvm",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetAmi.Invoke(new()
{
ExecutableUsers = new[]
{
"self",
},
MostRecent = true,
NameRegex = "^myami-[0-9]{3}",
Owners = new[]
{
"self",
},
Filters = new[]
{
new Aws.Ec2.Inputs.GetAmiFilterInputArgs
{
Name = "name",
Values = new[]
{
"myami-*",
},
},
new Aws.Ec2.Inputs.GetAmiFilterInputArgs
{
Name = "root-device-type",
Values = new[]
{
"ebs",
},
},
new Aws.Ec2.Inputs.GetAmiFilterInputArgs
{
Name = "virtualization-type",
Values = new[]
{
"hvm",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetAmiArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2Functions.getAmi(GetAmiArgs.builder()
.executableUsers("self")
.mostRecent(true)
.nameRegex("^myami-[0-9]{3}")
.owners("self")
.filters(
GetAmiFilterArgs.builder()
.name("name")
.values("myami-*")
.build(),
GetAmiFilterArgs.builder()
.name("root-device-type")
.values("ebs")
.build(),
GetAmiFilterArgs.builder()
.name("virtualization-type")
.values("hvm")
.build())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:ec2:getAmi
arguments:
executableUsers:
- self
mostRecent: true
nameRegex: ^myami-[0-9]{3}
owners:
- self
filters:
- name: name
values:
- myami-*
- name: root-device-type
values:
- ebs
- name: virtualization-type
values:
- hvm
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_getami" "example" {
executable_users = ["self"]
most_recent = true
name_regex = "^myami-[0-9]{3}"
owners = ["self"]
filters {
name = "name"
values = ["myami-*"]
}
filters {
name = "root-device-type"
values = ["ebs"]
}
filters {
name = "virtualization-type"
values = ["hvm"]
}
}
Using getAmi
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAmi(args: GetAmiArgs, opts?: InvokeOptions): Promise<GetAmiResult>
function getAmiOutput(args: GetAmiOutputArgs, opts?: InvokeOptions): Output<GetAmiResult>def get_ami(allow_unsafe_filter: Optional[bool] = None,
executable_users: Optional[Sequence[str]] = None,
filters: Optional[Sequence[GetAmiFilter]] = None,
include_deprecated: Optional[bool] = None,
most_recent: Optional[bool] = None,
name_regex: Optional[str] = None,
owners: Optional[Sequence[str]] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
uefi_data: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAmiResult
def get_ami_output(allow_unsafe_filter: pulumi.Input[Optional[bool]] = None,
executable_users: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetAmiFilterArgs]]]] = None,
include_deprecated: pulumi.Input[Optional[bool]] = None,
most_recent: pulumi.Input[Optional[bool]] = None,
name_regex: pulumi.Input[Optional[str]] = None,
owners: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
region: pulumi.Input[Optional[str]] = None,
tags: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
uefi_data: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAmiResult]func LookupAmi(ctx *Context, args *LookupAmiArgs, opts ...InvokeOption) (*LookupAmiResult, error)
func LookupAmiOutput(ctx *Context, args *LookupAmiOutputArgs, opts ...InvokeOption) LookupAmiResultOutput> Note: This function is named LookupAmi in the Go SDK.
public static class GetAmi
{
public static Task<GetAmiResult> InvokeAsync(GetAmiArgs args, InvokeOptions? opts = null)
public static Output<GetAmiResult> Invoke(GetAmiInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAmiResult> getAmi(GetAmiArgs args, InvokeOptions options)
public static Output<GetAmiResult> getAmi(GetAmiArgs args, InvokeOptions options)
fn::invoke:
function: aws:ec2/getAmi:getAmi
arguments:
# arguments dictionarydata "aws_ec2_getami" "name" {
# arguments
}The following arguments are supported:
- Allow
Unsafe boolFilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - Executable
Users List<string> - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - Filters
List<Get
Ami Filter> - One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - Include
Deprecated bool - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- Most
Recent bool - If more than one result is returned, use the most recent AMI.
- Name
Regex string - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- Owners List<string>
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- Any tags assigned to the image.
- Uefi
Data string Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- Allow
Unsafe boolFilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - Executable
Users []string - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - Filters
[]Get
Ami Filter - One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - Include
Deprecated bool - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- Most
Recent bool - If more than one result is returned, use the most recent AMI.
- Name
Regex string - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- Owners []string
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- Any tags assigned to the image.
- Uefi
Data string Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- allow_
unsafe_ boolfilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - executable_
users list(string) - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - filters list(object)
- One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - include_
deprecated bool - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- most_
recent bool - If more than one result is returned, use the most recent AMI.
- name_
regex string - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- owners list(string)
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map(string)
- Any tags assigned to the image.
- uefi_
data string Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- allow
Unsafe BooleanFilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - executable
Users List<String> - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - filters
List<Get
Ami Filter> - One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - include
Deprecated Boolean - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- most
Recent Boolean - If more than one result is returned, use the most recent AMI.
- name
Regex String - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- owners List<String>
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- Any tags assigned to the image.
- uefi
Data String Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- allow
Unsafe booleanFilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - executable
Users string[] - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - filters
Get
Ami Filter[] - One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - include
Deprecated boolean - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- most
Recent boolean - If more than one result is returned, use the most recent AMI.
- name
Regex string - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- owners string[]
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- Any tags assigned to the image.
- uefi
Data string Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- allow_
unsafe_ boolfilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - executable_
users Sequence[str] - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - filters
Sequence[Get
Ami Filter] - One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - include_
deprecated bool - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- most_
recent bool - If more than one result is returned, use the most recent AMI.
- name_
regex str - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- owners Sequence[str]
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- Any tags assigned to the image.
- uefi_
data str Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
- allow
Unsafe BooleanFilter - If true, allow unsafe filter values. With unsafe filters and
mostRecentset totrue, a third party may introduce a new image which will be returned by this data source. Consider filtering by owner or image ID rather than setting this argument. - executable
Users List<String> - Limit search to users with explicit launch permission on the image. Valid items are the numeric account ID or
self. - filters List<Property Map>
- One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-images in the AWS CLI reference. See
filterbelow. - include
Deprecated Boolean - If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
- most
Recent Boolean - If more than one result is returned, use the most recent AMI.
- name
Regex String - Regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. Combine this with other options to narrow down the list AWS returns.
- owners List<String>
- List of AMI owners to limit search. Valid values: an AWS account ID,
self(the current account), or an AWS owner alias (e.g.,amazon,aws-marketplace,microsoft). - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- Any tags assigned to the image.
- uefi
Data String Base64 representation of the non-volatile UEFI variable store.
NOTE: If more or less than a single match is returned by the search, this call will fail. Ensure that your search is specific enough to return a single AMI ID only, or use
mostRecentto choose the most recent one. If you want to match multiple AMIs, use theaws.ec2.getAmiIdsdata source instead.
getAmi Result
The following output properties are available:
- Architecture string
- OS architecture of the AMI (ie:
i386orx8664). - Arn string
- ARN of the AMI.
- Block
Device List<GetMappings Ami Block Device Mapping> - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - Boot
Mode string - Boot mode of the image.
- Creation
Date string - Date and time the image was created.
- Deprecation
Time string - Date and time when the image will be deprecated.
- Description string
- Description of the AMI that was provided during image creation.
- Ena
Support bool - Whether enhanced networking with ENA is enabled.
- Hypervisor string
- Hypervisor type of the image.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - ID of the AMI. Should be the same as the resource
id. - Image
Location string - Location of the AMI.
- Image
Owner stringAlias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - Image
Type string - Type of image.
- Imds
Support string - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - Kernel
Id string - Kernel associated with the image, if any. Only applicable for machine images.
- Last
Launched stringTime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- Name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- Owner
Id string - AWS account ID of the image owner.
- Platform string
- Value is Windows for
WindowsAMIs; otherwise blank. - Platform
Details string - Platform details associated with the billing code of the AMI.
- Product
Codes List<GetAmi Product Code> - Any product codes associated with the AMI. See
productCodesbelow. - Public bool
trueif the image has public launch permissions.- Ramdisk
Id string - RAM disk associated with the image, if any. Only applicable for machine images.
- Region string
- Root
Device stringName - Device name of the root device.
- Root
Device stringType - Type of root device (ie:
ebsorinstance-store). - Root
Snapshot stringId - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - Sriov
Net stringSupport - Whether enhanced networking is enabled.
- State string
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - State
Reason Dictionary<string, string> - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - Dictionary<string, string>
- Any tags assigned to the image.
- Tpm
Support string - If the image is configured for NitroTPM support, the value is
v2.0. - Usage
Operation string - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string - Type of virtualization of the AMI (ie:
hvmorparavirtual). - Allow
Unsafe boolFilter - Executable
Users List<string> - Filters
List<Get
Ami Filter> - Include
Deprecated bool - Most
Recent bool - Name
Regex string - Owners List<string>
- Uefi
Data string
- Architecture string
- OS architecture of the AMI (ie:
i386orx8664). - Arn string
- ARN of the AMI.
- Block
Device []GetMappings Ami Block Device Mapping - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - Boot
Mode string - Boot mode of the image.
- Creation
Date string - Date and time the image was created.
- Deprecation
Time string - Date and time when the image will be deprecated.
- Description string
- Description of the AMI that was provided during image creation.
- Ena
Support bool - Whether enhanced networking with ENA is enabled.
- Hypervisor string
- Hypervisor type of the image.
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - ID of the AMI. Should be the same as the resource
id. - Image
Location string - Location of the AMI.
- Image
Owner stringAlias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - Image
Type string - Type of image.
- Imds
Support string - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - Kernel
Id string - Kernel associated with the image, if any. Only applicable for machine images.
- Last
Launched stringTime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- Name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- Owner
Id string - AWS account ID of the image owner.
- Platform string
- Value is Windows for
WindowsAMIs; otherwise blank. - Platform
Details string - Platform details associated with the billing code of the AMI.
- Product
Codes []GetAmi Product Code - Any product codes associated with the AMI. See
productCodesbelow. - Public bool
trueif the image has public launch permissions.- Ramdisk
Id string - RAM disk associated with the image, if any. Only applicable for machine images.
- Region string
- Root
Device stringName - Device name of the root device.
- Root
Device stringType - Type of root device (ie:
ebsorinstance-store). - Root
Snapshot stringId - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - Sriov
Net stringSupport - Whether enhanced networking is enabled.
- State string
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - State
Reason map[string]string - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - map[string]string
- Any tags assigned to the image.
- Tpm
Support string - If the image is configured for NitroTPM support, the value is
v2.0. - Usage
Operation string - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- Virtualization
Type string - Type of virtualization of the AMI (ie:
hvmorparavirtual). - Allow
Unsafe boolFilter - Executable
Users []string - Filters
[]Get
Ami Filter - Include
Deprecated bool - Most
Recent bool - Name
Regex string - Owners []string
- Uefi
Data string
- architecture string
- OS architecture of the AMI (ie:
i386orx8664). - arn string
- ARN of the AMI.
- block_
device_ list(object)mappings - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - boot_
mode string - Boot mode of the image.
- creation_
date string - Date and time the image was created.
- deprecation_
time string - Date and time when the image will be deprecated.
- description string
- Description of the AMI that was provided during image creation.
- ena_
support bool - Whether enhanced networking with ENA is enabled.
- hypervisor string
- Hypervisor type of the image.
- id string
- The provider-assigned unique ID for this managed resource.
- image_
id string - ID of the AMI. Should be the same as the resource
id. - image_
location string - Location of the AMI.
- image_
owner_ stringalias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - image_
type string - Type of image.
- imds_
support string - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - kernel_
id string - Kernel associated with the image, if any. Only applicable for machine images.
- last_
launched_ stringtime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- owner_
id string - AWS account ID of the image owner.
- platform string
- Value is Windows for
WindowsAMIs; otherwise blank. - platform_
details string - Platform details associated with the billing code of the AMI.
- product_
codes list(object) - Any product codes associated with the AMI. See
productCodesbelow. - public bool
trueif the image has public launch permissions.- ramdisk_
id string - RAM disk associated with the image, if any. Only applicable for machine images.
- region string
- root_
device_ stringname - Device name of the root device.
- root_
device_ stringtype - Type of root device (ie:
ebsorinstance-store). - root_
snapshot_ stringid - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - sriov_
net_ stringsupport - Whether enhanced networking is enabled.
- state string
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - state_
reason map(string) - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - map(string)
- Any tags assigned to the image.
- tpm_
support string - If the image is configured for NitroTPM support, the value is
v2.0. - usage_
operation string - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization_
type string - Type of virtualization of the AMI (ie:
hvmorparavirtual). - allow_
unsafe_ boolfilter - executable_
users list(string) - filters list(object)
- include_
deprecated bool - most_
recent bool - name_
regex string - owners list(string)
- uefi_
data string
- architecture String
- OS architecture of the AMI (ie:
i386orx8664). - arn String
- ARN of the AMI.
- block
Device List<GetMappings Ami Block Device Mapping> - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - boot
Mode String - Boot mode of the image.
- creation
Date String - Date and time the image was created.
- deprecation
Time String - Date and time when the image will be deprecated.
- description String
- Description of the AMI that was provided during image creation.
- ena
Support Boolean - Whether enhanced networking with ENA is enabled.
- hypervisor String
- Hypervisor type of the image.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - ID of the AMI. Should be the same as the resource
id. - image
Location String - Location of the AMI.
- image
Owner StringAlias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - image
Type String - Type of image.
- imds
Support String - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - kernel
Id String - Kernel associated with the image, if any. Only applicable for machine images.
- last
Launched StringTime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- name String
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- owner
Id String - AWS account ID of the image owner.
- platform String
- Value is Windows for
WindowsAMIs; otherwise blank. - platform
Details String - Platform details associated with the billing code of the AMI.
- product
Codes List<GetAmi Product Code> - Any product codes associated with the AMI. See
productCodesbelow. - public_ Boolean
trueif the image has public launch permissions.- ramdisk
Id String - RAM disk associated with the image, if any. Only applicable for machine images.
- region String
- root
Device StringName - Device name of the root device.
- root
Device StringType - Type of root device (ie:
ebsorinstance-store). - root
Snapshot StringId - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - sriov
Net StringSupport - Whether enhanced networking is enabled.
- state String
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - state
Reason Map<String,String> - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - Map<String,String>
- Any tags assigned to the image.
- tpm
Support String - If the image is configured for NitroTPM support, the value is
v2.0. - usage
Operation String - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String - Type of virtualization of the AMI (ie:
hvmorparavirtual). - allow
Unsafe BooleanFilter - executable
Users List<String> - filters
List<Get
Ami Filter> - include
Deprecated Boolean - most
Recent Boolean - name
Regex String - owners List<String>
- uefi
Data String
- architecture string
- OS architecture of the AMI (ie:
i386orx8664). - arn string
- ARN of the AMI.
- block
Device GetMappings Ami Block Device Mapping[] - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - boot
Mode string - Boot mode of the image.
- creation
Date string - Date and time the image was created.
- deprecation
Time string - Date and time when the image will be deprecated.
- description string
- Description of the AMI that was provided during image creation.
- ena
Support boolean - Whether enhanced networking with ENA is enabled.
- hypervisor string
- Hypervisor type of the image.
- id string
- The provider-assigned unique ID for this managed resource.
- image
Id string - ID of the AMI. Should be the same as the resource
id. - image
Location string - Location of the AMI.
- image
Owner stringAlias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - image
Type string - Type of image.
- imds
Support string - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - kernel
Id string - Kernel associated with the image, if any. Only applicable for machine images.
- last
Launched stringTime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- owner
Id string - AWS account ID of the image owner.
- platform string
- Value is Windows for
WindowsAMIs; otherwise blank. - platform
Details string - Platform details associated with the billing code of the AMI.
- product
Codes GetAmi Product Code[] - Any product codes associated with the AMI. See
productCodesbelow. - public boolean
trueif the image has public launch permissions.- ramdisk
Id string - RAM disk associated with the image, if any. Only applicable for machine images.
- region string
- root
Device stringName - Device name of the root device.
- root
Device stringType - Type of root device (ie:
ebsorinstance-store). - root
Snapshot stringId - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - sriov
Net stringSupport - Whether enhanced networking is enabled.
- state string
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - state
Reason {[key: string]: string} - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - {[key: string]: string}
- Any tags assigned to the image.
- tpm
Support string - If the image is configured for NitroTPM support, the value is
v2.0. - usage
Operation string - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type string - Type of virtualization of the AMI (ie:
hvmorparavirtual). - allow
Unsafe booleanFilter - executable
Users string[] - filters
Get
Ami Filter[] - include
Deprecated boolean - most
Recent boolean - name
Regex string - owners string[]
- uefi
Data string
- architecture str
- OS architecture of the AMI (ie:
i386orx8664). - arn str
- ARN of the AMI.
- block_
device_ Sequence[Getmappings Ami Block Device Mapping] - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - boot_
mode str - Boot mode of the image.
- creation_
date str - Date and time the image was created.
- deprecation_
time str - Date and time when the image will be deprecated.
- description str
- Description of the AMI that was provided during image creation.
- ena_
support bool - Whether enhanced networking with ENA is enabled.
- hypervisor str
- Hypervisor type of the image.
- id str
- The provider-assigned unique ID for this managed resource.
- image_
id str - ID of the AMI. Should be the same as the resource
id. - image_
location str - Location of the AMI.
- image_
owner_ stralias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - image_
type str - Type of image.
- imds_
support str - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - kernel_
id str - Kernel associated with the image, if any. Only applicable for machine images.
- last_
launched_ strtime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- name str
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- owner_
id str - AWS account ID of the image owner.
- platform str
- Value is Windows for
WindowsAMIs; otherwise blank. - platform_
details str - Platform details associated with the billing code of the AMI.
- product_
codes Sequence[GetAmi Product Code] - Any product codes associated with the AMI. See
productCodesbelow. - public bool
trueif the image has public launch permissions.- ramdisk_
id str - RAM disk associated with the image, if any. Only applicable for machine images.
- region str
- root_
device_ strname - Device name of the root device.
- root_
device_ strtype - Type of root device (ie:
ebsorinstance-store). - root_
snapshot_ strid - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - sriov_
net_ strsupport - Whether enhanced networking is enabled.
- state str
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - state_
reason Mapping[str, str] - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - Mapping[str, str]
- Any tags assigned to the image.
- tpm_
support str - If the image is configured for NitroTPM support, the value is
v2.0. - usage_
operation str - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization_
type str - Type of virtualization of the AMI (ie:
hvmorparavirtual). - allow_
unsafe_ boolfilter - executable_
users Sequence[str] - filters
Sequence[Get
Ami Filter] - include_
deprecated bool - most_
recent bool - name_
regex str - owners Sequence[str]
- uefi_
data str
- architecture String
- OS architecture of the AMI (ie:
i386orx8664). - arn String
- ARN of the AMI.
- block
Device List<Property Map>Mappings - Set of objects with block device mappings of the AMI. See
blockDeviceMappingsbelow. - boot
Mode String - Boot mode of the image.
- creation
Date String - Date and time the image was created.
- deprecation
Time String - Date and time when the image will be deprecated.
- description String
- Description of the AMI that was provided during image creation.
- ena
Support Boolean - Whether enhanced networking with ENA is enabled.
- hypervisor String
- Hypervisor type of the image.
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - ID of the AMI. Should be the same as the resource
id. - image
Location String - Location of the AMI.
- image
Owner StringAlias - AWS account alias (for example,
amazon,self) or the AWS account ID of the AMI owner. - image
Type String - Type of image.
- imds
Support String - Instance Metadata Service (IMDS) support mode for the image. Set to
v2.0if instances ran from this image enforce IMDSv2. - kernel
Id String - Kernel associated with the image, if any. Only applicable for machine images.
- last
Launched StringTime - Date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported. For more information, see the following AWS document.
- name String
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- owner
Id String - AWS account ID of the image owner.
- platform String
- Value is Windows for
WindowsAMIs; otherwise blank. - platform
Details String - Platform details associated with the billing code of the AMI.
- product
Codes List<Property Map> - Any product codes associated with the AMI. See
productCodesbelow. - public Boolean
trueif the image has public launch permissions.- ramdisk
Id String - RAM disk associated with the image, if any. Only applicable for machine images.
- region String
- root
Device StringName - Device name of the root device.
- root
Device StringType - Type of root device (ie:
ebsorinstance-store). - root
Snapshot StringId - Snapshot id associated with the root device, if any (only applies to
ebsroot devices). - sriov
Net StringSupport - Whether enhanced networking is enabled.
- state String
- Current state of the AMI. If the state is
available, the image is successfully registered and can be used to launch an instance. - state
Reason Map<String> - Describes a state change. Fields are
UNSETif not available. SeestateReasonbelow. - Map<String>
- Any tags assigned to the image.
- tpm
Support String - If the image is configured for NitroTPM support, the value is
v2.0. - usage
Operation String - Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualization
Type String - Type of virtualization of the AMI (ie:
hvmorparavirtual). - allow
Unsafe BooleanFilter - executable
Users List<String> - filters List<Property Map>
- include
Deprecated Boolean - most
Recent Boolean - name
Regex String - owners List<String>
- uefi
Data String
Supporting Types
GetAmiBlockDeviceMapping
- Device
Name string - Physical name of the device.
- Ebs Dictionary<string, string>
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - No
Device string - Suppresses the specified device included in the block device mapping of the AMI.
- Virtual
Name string - Virtual device name (for instance stores).
- Device
Name string - Physical name of the device.
- Ebs map[string]string
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - No
Device string - Suppresses the specified device included in the block device mapping of the AMI.
- Virtual
Name string - Virtual device name (for instance stores).
- device_
name string - Physical name of the device.
- ebs map(string)
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - no_
device string - Suppresses the specified device included in the block device mapping of the AMI.
- virtual_
name string - Virtual device name (for instance stores).
- device
Name String - Physical name of the device.
- ebs Map<String,String>
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - no
Device String - Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name String - Virtual device name (for instance stores).
- device
Name string - Physical name of the device.
- ebs {[key: string]: string}
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - no
Device string - Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name string - Virtual device name (for instance stores).
- device_
name str - Physical name of the device.
- ebs Mapping[str, str]
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - no_
device str - Suppresses the specified device included in the block device mapping of the AMI.
- virtual_
name str - Virtual device name (for instance stores).
- device
Name String - Physical name of the device.
- ebs Map<String>
- Map containing EBS information, if the device is EBS based. Unlike most object attributes, these are accessed directly (e.g.,
ebs.volume_sizeorebs["volumeSize"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size). Seeebsbelow. - no
Device String - Suppresses the specified device included in the block device mapping of the AMI.
- virtual
Name String - Virtual device name (for instance stores).
GetAmiFilter
- Name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- Values List<string>
- Set of values that are accepted for the given filter.
- Name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- Values []string
- Set of values that are accepted for the given filter.
- name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- values list(string)
- Set of values that are accepted for the given filter.
- name String
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- values List<String>
- Set of values that are accepted for the given filter.
- name string
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- values string[]
- Set of values that are accepted for the given filter.
- name str
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- values Sequence[str]
- Set of values that are accepted for the given filter.
- name String
- Name of the filter. For a full reference, check out describe-images in the AWS CLI reference.
- values List<String>
- Set of values that are accepted for the given filter.
GetAmiProductCode
- Product
Code stringId - The product code.
- Product
Code stringType - The type of product code.
- Product
Code stringId - The product code.
- Product
Code stringType - The type of product code.
- product_
code_ stringid - The product code.
- product_
code_ stringtype - The type of product code.
- product
Code StringId - The product code.
- product
Code StringType - The type of product code.
- product
Code stringId - The product code.
- product
Code stringType - The type of product code.
- product_
code_ strid - The product code.
- product_
code_ strtype - The type of product code.
- product
Code StringId - The product code.
- product
Code StringType - The type of product code.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Friday, May 29, 2026 by Pulumi