Ami

The AMI resource allows the creation and management of a completely-custom Amazon Machine Image (AMI).

If you just want to duplicate an existing AMI, possibly copying it to another region, it’s better to use aws.ec2.AmiCopy instead.

If you just want to share an existing AMI with another AWS account, it’s better to use aws.ec2.AmiLaunchPermission instead.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // Create an AMI that will start a machine whose root device is backed by
        // an EBS volume populated from a snapshot. It is assumed that such a snapshot
        // already exists with the id "snap-xxxxxxxx".
        var example = new Aws.Ec2.Ami("example", new Aws.Ec2.AmiArgs
        {
            EbsBlockDevices = 
            {
                new Aws.Ec2.Inputs.AmiEbsBlockDeviceArgs
                {
                    DeviceName = "/dev/xvda",
                    SnapshotId = "snap-xxxxxxxx",
                    VolumeSize = 8,
                },
            },
            RootDeviceName = "/dev/xvda",
            VirtualizationType = "hvm",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewAmi(ctx, "example", &ec2.AmiArgs{
			EbsBlockDevices: ec2.AmiEbsBlockDeviceArray{
				&ec2.AmiEbsBlockDeviceArgs{
					DeviceName: pulumi.String("/dev/xvda"),
					SnapshotId: pulumi.String("snap-xxxxxxxx"),
					VolumeSize: pulumi.Int(8),
				},
			},
			RootDeviceName:     pulumi.String("/dev/xvda"),
			VirtualizationType: pulumi.String("hvm"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

# Create an AMI that will start a machine whose root device is backed by
# an EBS volume populated from a snapshot. It is assumed that such a snapshot
# already exists with the id "snap-xxxxxxxx".
example = aws.ec2.Ami("example",
    ebs_block_devices=[aws.ec2.AmiEbsBlockDeviceArgs(
        device_name="/dev/xvda",
        snapshot_id="snap-xxxxxxxx",
        volume_size=8,
    )],
    root_device_name="/dev/xvda",
    virtualization_type="hvm")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create an AMI that will start a machine whose root device is backed by
// an EBS volume populated from a snapshot. It is assumed that such a snapshot
// already exists with the id "snap-xxxxxxxx".
const example = new aws.ec2.Ami("example", {
    ebsBlockDevices: [{
        deviceName: "/dev/xvda",
        snapshotId: "snap-xxxxxxxx",
        volumeSize: 8,
    }],
    rootDeviceName: "/dev/xvda",
    virtualizationType: "hvm",
});

Create a Ami Resource

new Ami(name: string, args?: AmiArgs, opts?: CustomResourceOptions);
@overload
def Ami(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        architecture: Optional[str] = None,
        description: Optional[str] = None,
        ebs_block_devices: Optional[Sequence[AmiEbsBlockDeviceArgs]] = None,
        ena_support: Optional[bool] = None,
        ephemeral_block_devices: Optional[Sequence[AmiEphemeralBlockDeviceArgs]] = None,
        image_location: Optional[str] = None,
        kernel_id: Optional[str] = None,
        name: Optional[str] = None,
        ramdisk_id: Optional[str] = None,
        root_device_name: Optional[str] = None,
        sriov_net_support: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        virtualization_type: Optional[str] = None)
@overload
def Ami(resource_name: str,
        args: Optional[AmiArgs] = None,
        opts: Optional[ResourceOptions] = None)
func NewAmi(ctx *Context, name string, args *AmiArgs, opts ...ResourceOption) (*Ami, error)
public Ami(string name, AmiArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AmiArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AmiArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AmiArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AmiArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Ami Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Ami resource accepts the following input properties:

Architecture string
Machine architecture for created instances. Defaults to “x86_64”.
Description string
A longer, human-readable description for the AMI.
EbsBlockDevices List<AmiEbsBlockDeviceArgs>
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
EnaSupport bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
EphemeralBlockDevices List<AmiEphemeralBlockDeviceArgs>
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
ImageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
KernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
Name string
A region-unique name for the AMI.
RamdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
RootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
SriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
Tags Dictionary<string, string>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
VirtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
Architecture string
Machine architecture for created instances. Defaults to “x86_64”.
Description string
A longer, human-readable description for the AMI.
EbsBlockDevices []AmiEbsBlockDevice
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
EnaSupport bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
EphemeralBlockDevices []AmiEphemeralBlockDevice
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
ImageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
KernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
Name string
A region-unique name for the AMI.
RamdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
RootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
SriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
Tags map[string]string
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
VirtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
architecture string
Machine architecture for created instances. Defaults to “x86_64”.
description string
A longer, human-readable description for the AMI.
ebsBlockDevices AmiEbsBlockDeviceArgs[]
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
enaSupport boolean
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
ephemeralBlockDevices AmiEphemeralBlockDeviceArgs[]
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
imageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
kernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
name string
A region-unique name for the AMI.
ramdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
rootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
sriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
tags {[key: string]: string}
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
virtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
architecture str
Machine architecture for created instances. Defaults to “x86_64”.
description str
A longer, human-readable description for the AMI.
ebs_block_devices Sequence[AmiEbsBlockDeviceArgs]
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
ena_support bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
ephemeral_block_devices Sequence[AmiEphemeralBlockDeviceArgs]
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
image_location str
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
kernel_id str
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
name str
A region-unique name for the AMI.
ramdisk_id str
The id of an initrd image (ARI) that will be used when booting the created instances.
root_device_name str
The name of the root device (for example, /dev/sda1, or /dev/xvda).
sriov_net_support str
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
tags Mapping[str, str]
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
virtualization_type str
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

Outputs

All input properties are implicitly available as output properties. Additionally, the Ami resource produces the following output properties:

Arn string
The ARN of the AMI.
Hypervisor string
The hypervisor type of the image.
Id string
The provider-assigned unique ID for this managed resource.
ImageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
ImageType string
The type of image.
ManageEbsSnapshots bool
OwnerId string
The AWS account ID of the image owner.
Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
PlatformDetails string
The platform details associated with the billing code of the AMI.
Public bool
Indicates whether the image has public launch permissions.
RootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
UsageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
Arn string
The ARN of the AMI.
Hypervisor string
The hypervisor type of the image.
Id string
The provider-assigned unique ID for this managed resource.
ImageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
ImageType string
The type of image.
ManageEbsSnapshots bool
OwnerId string
The AWS account ID of the image owner.
Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
PlatformDetails string
The platform details associated with the billing code of the AMI.
Public bool
Indicates whether the image has public launch permissions.
RootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
UsageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
arn string
The ARN of the AMI.
hypervisor string
The hypervisor type of the image.
id string
The provider-assigned unique ID for this managed resource.
imageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
imageType string
The type of image.
manageEbsSnapshots boolean
ownerId string
The AWS account ID of the image owner.
platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
platformDetails string
The platform details associated with the billing code of the AMI.
public boolean
Indicates whether the image has public launch permissions.
rootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
usageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
arn str
The ARN of the AMI.
hypervisor str
The hypervisor type of the image.
id str
The provider-assigned unique ID for this managed resource.
image_owner_alias str
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
image_type str
The type of image.
manage_ebs_snapshots bool
owner_id str
The AWS account ID of the image owner.
platform str
This value is set to windows for Windows AMIs; otherwise, it is blank.
platform_details str
The platform details associated with the billing code of the AMI.
public bool
Indicates whether the image has public launch permissions.
root_snapshot_id str
The Snapshot ID for the root volume (for EBS-backed AMIs)
usage_operation str
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.

Look up an Existing Ami Resource

Get an existing Ami resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AmiState, opts?: CustomResourceOptions): Ami
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        architecture: Optional[str] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        ebs_block_devices: Optional[Sequence[AmiEbsBlockDeviceArgs]] = None,
        ena_support: Optional[bool] = None,
        ephemeral_block_devices: Optional[Sequence[AmiEphemeralBlockDeviceArgs]] = None,
        hypervisor: Optional[str] = None,
        image_location: Optional[str] = None,
        image_owner_alias: Optional[str] = None,
        image_type: Optional[str] = None,
        kernel_id: Optional[str] = None,
        manage_ebs_snapshots: Optional[bool] = None,
        name: Optional[str] = None,
        owner_id: Optional[str] = None,
        platform: Optional[str] = None,
        platform_details: Optional[str] = None,
        public: Optional[bool] = None,
        ramdisk_id: Optional[str] = None,
        root_device_name: Optional[str] = None,
        root_snapshot_id: Optional[str] = None,
        sriov_net_support: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        usage_operation: Optional[str] = None,
        virtualization_type: Optional[str] = None) -> Ami
func GetAmi(ctx *Context, name string, id IDInput, state *AmiState, opts ...ResourceOption) (*Ami, error)
public static Ami Get(string name, Input<string> id, AmiState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Architecture string
Machine architecture for created instances. Defaults to “x86_64”.
Arn string
The ARN of the AMI.
Description string
A longer, human-readable description for the AMI.
EbsBlockDevices List<AmiEbsBlockDeviceArgs>
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
EnaSupport bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
EphemeralBlockDevices List<AmiEphemeralBlockDeviceArgs>
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
Hypervisor string
The hypervisor type of the image.
ImageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
ImageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
ImageType string
The type of image.
KernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
ManageEbsSnapshots bool
Name string
A region-unique name for the AMI.
OwnerId string
The AWS account ID of the image owner.
Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
PlatformDetails string
The platform details associated with the billing code of the AMI.
Public bool
Indicates whether the image has public launch permissions.
RamdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
RootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
RootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
SriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
Tags Dictionary<string, string>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
UsageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
VirtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
Architecture string
Machine architecture for created instances. Defaults to “x86_64”.
Arn string
The ARN of the AMI.
Description string
A longer, human-readable description for the AMI.
EbsBlockDevices []AmiEbsBlockDevice
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
EnaSupport bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
EphemeralBlockDevices []AmiEphemeralBlockDevice
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
Hypervisor string
The hypervisor type of the image.
ImageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
ImageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
ImageType string
The type of image.
KernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
ManageEbsSnapshots bool
Name string
A region-unique name for the AMI.
OwnerId string
The AWS account ID of the image owner.
Platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
PlatformDetails string
The platform details associated with the billing code of the AMI.
Public bool
Indicates whether the image has public launch permissions.
RamdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
RootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
RootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
SriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
Tags map[string]string
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
UsageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
VirtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
architecture string
Machine architecture for created instances. Defaults to “x86_64”.
arn string
The ARN of the AMI.
description string
A longer, human-readable description for the AMI.
ebsBlockDevices AmiEbsBlockDeviceArgs[]
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
enaSupport boolean
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
ephemeralBlockDevices AmiEphemeralBlockDeviceArgs[]
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
hypervisor string
The hypervisor type of the image.
imageLocation string
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
imageOwnerAlias string
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
imageType string
The type of image.
kernelId string
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
manageEbsSnapshots boolean
name string
A region-unique name for the AMI.
ownerId string
The AWS account ID of the image owner.
platform string
This value is set to windows for Windows AMIs; otherwise, it is blank.
platformDetails string
The platform details associated with the billing code of the AMI.
public boolean
Indicates whether the image has public launch permissions.
ramdiskId string
The id of an initrd image (ARI) that will be used when booting the created instances.
rootDeviceName string
The name of the root device (for example, /dev/sda1, or /dev/xvda).
rootSnapshotId string
The Snapshot ID for the root volume (for EBS-backed AMIs)
sriovNetSupport string
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
tags {[key: string]: string}
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
usageOperation string
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
virtualizationType string
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.
architecture str
Machine architecture for created instances. Defaults to “x86_64”.
arn str
The ARN of the AMI.
description str
A longer, human-readable description for the AMI.
ebs_block_devices Sequence[AmiEbsBlockDeviceArgs]
Nested block describing an EBS block device that should be attached to created instances. The structure of this block is described below.
ena_support bool
Specifies whether enhanced networking with ENA is enabled. Defaults to false.
ephemeral_block_devices Sequence[AmiEphemeralBlockDeviceArgs]
Nested block describing an ephemeral block device that should be attached to created instances. The structure of this block is described below.
hypervisor str
The hypervisor type of the image.
image_location str
Path to an S3 object containing an image manifest, e.g. created by the ec2-upload-bundle command in the EC2 command line tools.
image_owner_alias str
The AWS account alias (for example, amazon, self) or the AWS account ID of the AMI owner.
image_type str
The type of image.
kernel_id str
The id of the kernel image (AKI) that will be used as the paravirtual kernel in created instances.
manage_ebs_snapshots bool
name str
A region-unique name for the AMI.
owner_id str
The AWS account ID of the image owner.
platform str
This value is set to windows for Windows AMIs; otherwise, it is blank.
platform_details str
The platform details associated with the billing code of the AMI.
public bool
Indicates whether the image has public launch permissions.
ramdisk_id str
The id of an initrd image (ARI) that will be used when booting the created instances.
root_device_name str
The name of the root device (for example, /dev/sda1, or /dev/xvda).
root_snapshot_id str
The Snapshot ID for the root volume (for EBS-backed AMIs)
sriov_net_support str
When set to “simple” (the default), enables enhanced networking for created instances. No other value is supported at this time.
tags Mapping[str, str]
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
usage_operation str
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
virtualization_type str
Keyword to choose what virtualization mode created instances will use. Can be either “paravirtual” (the default) or “hvm”. The choice of virtualization type changes the set of further arguments that are required, as described below.

Supporting Types

AmiEbsBlockDevice

DeviceName string
The path at which the device is exposed to created instances.
DeleteOnTermination bool
Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
Encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.
Iops int
Number of I/O operations per second the created volumes will support.
SnapshotId string
The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.
Throughput int
The throughput that the EBS volume supports, in MiB/s. Only valid for volume_type of gp3.
VolumeSize int
The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.
VolumeType string
The type of EBS volume to create. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: standard).
DeviceName string
The path at which the device is exposed to created instances.
DeleteOnTermination bool
Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
Encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.
Iops int
Number of I/O operations per second the created volumes will support.
SnapshotId string
The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.
Throughput int
The throughput that the EBS volume supports, in MiB/s. Only valid for volume_type of gp3.
VolumeSize int
The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.
VolumeType string
The type of EBS volume to create. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: standard).
deviceName string
The path at which the device is exposed to created instances.
deleteOnTermination boolean
Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
encrypted boolean
Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.
iops number
Number of I/O operations per second the created volumes will support.
snapshotId string
The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.
throughput number
The throughput that the EBS volume supports, in MiB/s. Only valid for volume_type of gp3.
volumeSize number
The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.
volumeType string
The type of EBS volume to create. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: standard).
device_name str
The path at which the device is exposed to created instances.
delete_on_termination bool
Boolean controlling whether the EBS volumes created to support each created instance will be deleted once that instance is terminated.
encrypted bool
Boolean controlling whether the created EBS volumes will be encrypted. Can’t be used with snapshot_id.
iops int
Number of I/O operations per second the created volumes will support.
snapshot_id str
The id of an EBS snapshot that will be used to initialize the created EBS volumes. If set, the volume_size attribute must be at least as large as the referenced snapshot.
throughput int
The throughput that the EBS volume supports, in MiB/s. Only valid for volume_type of gp3.
volume_size int
The size of created volumes in GiB. If snapshot_id is set and volume_size is omitted then the volume will have the same size as the selected snapshot.
volume_type str
The type of EBS volume to create. Can be standard, gp2, gp3, io1, io2, sc1 or st1 (Default: standard).

AmiEphemeralBlockDevice

DeviceName string
The path at which the device is exposed to created instances.
VirtualName string
A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.
DeviceName string
The path at which the device is exposed to created instances.
VirtualName string
A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.
deviceName string
The path at which the device is exposed to created instances.
virtualName string
A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.
device_name str
The path at which the device is exposed to created instances.
virtual_name str
A name for the ephemeral device, of the form “ephemeralN” where N is a volume number starting from zero.

Import

aws_ami can be imported using the ID of the AMI, e.g.

 $ pulumi import aws:ec2/ami:Ami example ami-12345678

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.