aws.ec2.getAmi
Explore with Pulumi AI
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/v6/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.List;
import java.util.ArrayList;
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
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(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,
            tags: Optional[Mapping[str, str]] = None,
            uefi_data: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetAmiResult
def get_ami_output(executable_users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAmiFilterArgs]]]] = None,
            include_deprecated: Optional[pulumi.Input[bool]] = None,
            most_recent: Optional[pulumi.Input[bool]] = None,
            name_regex: Optional[pulumi.Input[str]] = None,
            owners: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            uefi_data: Optional[pulumi.Input[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 dictionaryThe following arguments are supported:
- ExecutableUsers List<string>
- Limit search to users with explicit launch permission on
the image. Valid items are the numeric account ID or self.
- Filters
List<GetAmi 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][1].
- IncludeDeprecated 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.
- MostRecent bool
- If more than one result is returned, use the most recent AMI.
- NameRegex 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- Dictionary<string, string>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- UefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- ExecutableUsers []string
- Limit search to users with explicit launch permission on
the image. Valid items are the numeric account ID or self.
- Filters
[]GetAmi 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][1].
- IncludeDeprecated 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.
- MostRecent bool
- If more than one result is returned, use the most recent AMI.
- NameRegex 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- map[string]string
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- UefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- executableUsers List<String>
- Limit search to users with explicit launch permission on
the image. Valid items are the numeric account ID or self.
- filters
List<GetAmi 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][1].
- includeDeprecated 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.
- mostRecent Boolean
- If more than one result is returned, use the most recent AMI.
- nameRegex 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- Map<String,String>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- uefiData String
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- executableUsers string[]
- Limit search to users with explicit launch permission on
the image. Valid items are the numeric account ID or self.
- filters
GetAmi 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][1].
- includeDeprecated 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.
- mostRecent boolean
- If more than one result is returned, use the most recent AMI.
- nameRegex 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- {[key: string]: string}
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- uefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- 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[GetAmi 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][1].
- 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- Mapping[str, str]
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- uefi_data str
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- executableUsers 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][1].
- includeDeprecated 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.
- mostRecent Boolean
- If more than one result is returned, use the most recent AMI.
- nameRegex 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. - 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 - most_recentto choose the most recent one. If you want to match multiple AMIs, use the- aws.ec2.getAmiIdsdata source instead.
- 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).
- Map<String>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- uefiData String
- (Optional) Base64 representation of the non-volatile UEFI variable store.
getAmi Result
The following output properties are available:
- Architecture string
- OS architecture of the AMI (ie: i386orx86_64).
- Arn string
- ARN of the AMI.
- BlockDevice List<GetMappings Ami Block Device Mapping> 
- Set of objects with block device mappings of the AMI.
- BootMode string
- Boot mode of the image.
- CreationDate string
- Date and time the image was created.
- DeprecationTime string
- Date and time when the image will be deprecated.
- Description string
- Description of the AMI that was provided during image creation.
- EnaSupport 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.
- ImageId string
- ID of the AMI. Should be the same as the resource id.
- ImageLocation string
- Location of the AMI.
- ImageOwner stringAlias 
- AWS account alias (for example, amazon,self) or the AWS account ID of the AMI owner.
- ImageType string
- Type of image.
- ImdsSupport string
- Instance Metadata Service (IMDS) support mode for the image. Set to v2.0if instances ran from this image enforce IMDSv2.
- KernelId string
- Kernel associated with the image, if any. Only applicable for machine images.
- Name string
- Name of the AMI that was provided during image creation.
- OwnerId string
- AWS account ID of the image owner.
- Platform string
- Value is Windows for WindowsAMIs; otherwise blank.
- PlatformDetails string
- Platform details associated with the billing code of the AMI.
- ProductCodes List<GetAmi Product Code> 
- Any product codes associated with the AMI.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- Public bool
- trueif the image has public launch permissions.
- RamdiskId string
- RAM disk associated with the image, if any. Only applicable for machine images.
- RootDevice stringName 
- Device name of the root device.
- RootDevice stringType 
- Type of root device (ie: ebsorinstance-store).
- RootSnapshot stringId 
- Snapshot id associated with the root device, if any
(only applies to ebsroot devices).
- SriovNet 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.
- StateReason Dictionary<string, string>
- Describes a state change. Fields are UNSETif not available.
- Dictionary<string, string>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- TpmSupport string
- If the image is configured for NitroTPM support, the value is v2.0.
- UsageOperation string
- Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- VirtualizationType string
- Type of virtualization of the AMI (ie: hvmorparavirtual).
- ExecutableUsers List<string>
- Filters
List<GetAmi Filter> 
- IncludeDeprecated bool
- MostRecent bool
- NameRegex string
- Owners List<string>
- UefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- Architecture string
- OS architecture of the AMI (ie: i386orx86_64).
- Arn string
- ARN of the AMI.
- BlockDevice []GetMappings Ami Block Device Mapping 
- Set of objects with block device mappings of the AMI.
- BootMode string
- Boot mode of the image.
- CreationDate string
- Date and time the image was created.
- DeprecationTime string
- Date and time when the image will be deprecated.
- Description string
- Description of the AMI that was provided during image creation.
- EnaSupport 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.
- ImageId string
- ID of the AMI. Should be the same as the resource id.
- ImageLocation string
- Location of the AMI.
- ImageOwner stringAlias 
- AWS account alias (for example, amazon,self) or the AWS account ID of the AMI owner.
- ImageType string
- Type of image.
- ImdsSupport string
- Instance Metadata Service (IMDS) support mode for the image. Set to v2.0if instances ran from this image enforce IMDSv2.
- KernelId string
- Kernel associated with the image, if any. Only applicable for machine images.
- Name string
- Name of the AMI that was provided during image creation.
- OwnerId string
- AWS account ID of the image owner.
- Platform string
- Value is Windows for WindowsAMIs; otherwise blank.
- PlatformDetails string
- Platform details associated with the billing code of the AMI.
- ProductCodes []GetAmi Product Code 
- Any product codes associated with the AMI.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- Public bool
- trueif the image has public launch permissions.
- RamdiskId string
- RAM disk associated with the image, if any. Only applicable for machine images.
- RootDevice stringName 
- Device name of the root device.
- RootDevice stringType 
- Type of root device (ie: ebsorinstance-store).
- RootSnapshot stringId 
- Snapshot id associated with the root device, if any
(only applies to ebsroot devices).
- SriovNet 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.
- StateReason map[string]string
- Describes a state change. Fields are UNSETif not available.
- map[string]string
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- TpmSupport string
- If the image is configured for NitroTPM support, the value is v2.0.
- UsageOperation string
- Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- VirtualizationType string
- Type of virtualization of the AMI (ie: hvmorparavirtual).
- ExecutableUsers []string
- Filters
[]GetAmi Filter 
- IncludeDeprecated bool
- MostRecent bool
- NameRegex string
- Owners []string
- UefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- architecture String
- OS architecture of the AMI (ie: i386orx86_64).
- arn String
- ARN of the AMI.
- blockDevice List<GetMappings Ami Block Device Mapping> 
- Set of objects with block device mappings of the AMI.
- bootMode String
- Boot mode of the image.
- creationDate String
- Date and time the image was created.
- deprecationTime String
- Date and time when the image will be deprecated.
- description String
- Description of the AMI that was provided during image creation.
- enaSupport 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.
- imageId String
- ID of the AMI. Should be the same as the resource id.
- imageLocation String
- Location of the AMI.
- imageOwner StringAlias 
- AWS account alias (for example, amazon,self) or the AWS account ID of the AMI owner.
- imageType String
- Type of image.
- imdsSupport String
- Instance Metadata Service (IMDS) support mode for the image. Set to v2.0if instances ran from this image enforce IMDSv2.
- kernelId String
- Kernel associated with the image, if any. Only applicable for machine images.
- name String
- Name of the AMI that was provided during image creation.
- ownerId String
- AWS account ID of the image owner.
- platform String
- Value is Windows for WindowsAMIs; otherwise blank.
- platformDetails String
- Platform details associated with the billing code of the AMI.
- productCodes List<GetAmi Product Code> 
- Any product codes associated with the AMI.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- public_ Boolean
- trueif the image has public launch permissions.
- ramdiskId String
- RAM disk associated with the image, if any. Only applicable for machine images.
- rootDevice StringName 
- Device name of the root device.
- rootDevice StringType 
- Type of root device (ie: ebsorinstance-store).
- rootSnapshot StringId 
- Snapshot id associated with the root device, if any
(only applies to ebsroot devices).
- sriovNet 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.
- stateReason Map<String,String>
- Describes a state change. Fields are UNSETif not available.
- Map<String,String>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- tpmSupport String
- If the image is configured for NitroTPM support, the value is v2.0.
- usageOperation String
- Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualizationType String
- Type of virtualization of the AMI (ie: hvmorparavirtual).
- executableUsers List<String>
- filters
List<GetAmi Filter> 
- includeDeprecated Boolean
- mostRecent Boolean
- nameRegex String
- owners List<String>
- uefiData String
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- architecture string
- OS architecture of the AMI (ie: i386orx86_64).
- arn string
- ARN of the AMI.
- blockDevice GetMappings Ami Block Device Mapping[] 
- Set of objects with block device mappings of the AMI.
- bootMode string
- Boot mode of the image.
- creationDate string
- Date and time the image was created.
- deprecationTime string
- Date and time when the image will be deprecated.
- description string
- Description of the AMI that was provided during image creation.
- enaSupport 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.
- imageId string
- ID of the AMI. Should be the same as the resource id.
- imageLocation string
- Location of the AMI.
- imageOwner stringAlias 
- AWS account alias (for example, amazon,self) or the AWS account ID of the AMI owner.
- imageType string
- Type of image.
- imdsSupport string
- Instance Metadata Service (IMDS) support mode for the image. Set to v2.0if instances ran from this image enforce IMDSv2.
- kernelId string
- Kernel associated with the image, if any. Only applicable for machine images.
- name string
- Name of the AMI that was provided during image creation.
- ownerId string
- AWS account ID of the image owner.
- platform string
- Value is Windows for WindowsAMIs; otherwise blank.
- platformDetails string
- Platform details associated with the billing code of the AMI.
- productCodes GetAmi Product Code[] 
- Any product codes associated with the AMI.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- public boolean
- trueif the image has public launch permissions.
- ramdiskId string
- RAM disk associated with the image, if any. Only applicable for machine images.
- rootDevice stringName 
- Device name of the root device.
- rootDevice stringType 
- Type of root device (ie: ebsorinstance-store).
- rootSnapshot stringId 
- Snapshot id associated with the root device, if any
(only applies to ebsroot devices).
- sriovNet 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.
- stateReason {[key: string]: string}
- Describes a state change. Fields are UNSETif not available.
- {[key: string]: string}
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- tpmSupport string
- If the image is configured for NitroTPM support, the value is v2.0.
- usageOperation string
- Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualizationType string
- Type of virtualization of the AMI (ie: hvmorparavirtual).
- executableUsers string[]
- filters
GetAmi Filter[] 
- includeDeprecated boolean
- mostRecent boolean
- nameRegex string
- owners string[]
- uefiData string
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- architecture str
- OS architecture of the AMI (ie: i386orx86_64).
- arn str
- ARN of the AMI.
- block_device_ Sequence[Getmappings Ami Block Device Mapping] 
- Set of objects with block device mappings of the AMI.
- 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.
- name str
- Name of the AMI that was provided during image creation.
- 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.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- 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.
- 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.
- Mapping[str, str]
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- 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).
- executable_users Sequence[str]
- filters
Sequence[GetAmi Filter] 
- include_deprecated bool
- most_recent bool
- name_regex str
- owners Sequence[str]
- uefi_data str
- (Optional) Base64 representation of the non-volatile UEFI variable store.
- architecture String
- OS architecture of the AMI (ie: i386orx86_64).
- arn String
- ARN of the AMI.
- blockDevice List<Property Map>Mappings 
- Set of objects with block device mappings of the AMI.
- bootMode String
- Boot mode of the image.
- creationDate String
- Date and time the image was created.
- deprecationTime String
- Date and time when the image will be deprecated.
- description String
- Description of the AMI that was provided during image creation.
- enaSupport 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.
- imageId String
- ID of the AMI. Should be the same as the resource id.
- imageLocation String
- Location of the AMI.
- imageOwner StringAlias 
- AWS account alias (for example, amazon,self) or the AWS account ID of the AMI owner.
- imageType String
- Type of image.
- imdsSupport String
- Instance Metadata Service (IMDS) support mode for the image. Set to v2.0if instances ran from this image enforce IMDSv2.
- kernelId String
- Kernel associated with the image, if any. Only applicable for machine images.
- name String
- Name of the AMI that was provided during image creation.
- ownerId String
- AWS account ID of the image owner.
- platform String
- Value is Windows for WindowsAMIs; otherwise blank.
- platformDetails String
- Platform details associated with the billing code of the AMI.
- productCodes List<Property Map>
- Any product codes associated with the AMI.- product_codes.#.product_code_id- The product code.
- product_codes.#.product_code_type- The type of product code.
 
- public Boolean
- trueif the image has public launch permissions.
- ramdiskId String
- RAM disk associated with the image, if any. Only applicable for machine images.
- rootDevice StringName 
- Device name of the root device.
- rootDevice StringType 
- Type of root device (ie: ebsorinstance-store).
- rootSnapshot StringId 
- Snapshot id associated with the root device, if any
(only applies to ebsroot devices).
- sriovNet 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.
- stateReason Map<String>
- Describes a state change. Fields are UNSETif not available.
- Map<String>
- Any tags assigned to the image.- tags.#.key- Key name of the tag.
- tags.#.value- Value of the tag.
 
- tpmSupport String
- If the image is configured for NitroTPM support, the value is v2.0.
- usageOperation String
- Operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
- virtualizationType String
- Type of virtualization of the AMI (ie: hvmorparavirtual).
- executableUsers List<String>
- filters List<Property Map>
- includeDeprecated Boolean
- mostRecent Boolean
- nameRegex String
- owners List<String>
- uefiData String
- (Optional) Base64 representation of the non-volatile UEFI variable store.
Supporting Types
GetAmiBlockDeviceMapping    
- DeviceName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- NoDevice string
- Suppresses the specified device included in the block device mapping of the AMI.
- VirtualName string
- Virtual device name (for instance stores).
- DeviceName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- NoDevice string
- Suppresses the specified device included in the block device mapping of the AMI.
- VirtualName string
- Virtual device name (for instance stores).
- deviceName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- noDevice String
- Suppresses the specified device included in the block device mapping of the AMI.
- virtualName String
- Virtual device name (for instance stores).
- deviceName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- noDevice string
- Suppresses the specified device included in the block device mapping of the AMI.
- virtualName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- 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).
- deviceName 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["volume_size"]) rather than accessed through the first element of a list (e.g.,ebs[0].volume_size).
- noDevice String
- Suppresses the specified device included in the block device mapping of the AMI.
- virtualName String
- Virtual device name (for instance stores).
GetAmiFilter  
GetAmiProductCode   
- ProductCode stringId 
- ProductCode stringType 
- ProductCode stringId 
- ProductCode stringType 
- productCode StringId 
- productCode StringType 
- productCode stringId 
- productCode stringType 
- product_code_ strid 
- product_code_ strtype 
- productCode StringId 
- productCode StringType 
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.