1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. SpotFleetRequest
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ec2.SpotFleetRequest

Explore with Pulumi AI

Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot instances to be requested on the Spot market.

**NOTE AWS strongly discourages the use of the legacy APIs called by this resource. We recommend using the EC2 Fleet or Auto Scaling Group resources instead.

Example Usage

Using launch specifications

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Request a Spot fleet
const cheapCompute = new aws.ec2.SpotFleetRequest("cheap_compute", {
    iamFleetRole: "arn:aws:iam::12345678:role/spot-fleet",
    spotPrice: "0.03",
    allocationStrategy: "diversified",
    targetCapacity: 6,
    validUntil: "2019-11-04T20:44:20Z",
    launchSpecifications: [
        {
            instanceType: "m4.10xlarge",
            ami: "ami-1234",
            spotPrice: "2.793",
            placementTenancy: "dedicated",
            iamInstanceProfileArn: example.arn,
        },
        {
            instanceType: "m4.4xlarge",
            ami: "ami-5678",
            keyName: "my-key",
            spotPrice: "1.117",
            iamInstanceProfileArn: example.arn,
            availabilityZone: "us-west-1a",
            subnetId: "subnet-1234",
            weightedCapacity: "35",
            rootBlockDevices: [{
                volumeSize: 300,
                volumeType: "gp2",
            }],
            tags: {
                Name: "spot-fleet-example",
            },
        },
    ],
});
Copy
import pulumi
import pulumi_aws as aws

# Request a Spot fleet
cheap_compute = aws.ec2.SpotFleetRequest("cheap_compute",
    iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet",
    spot_price="0.03",
    allocation_strategy="diversified",
    target_capacity=6,
    valid_until="2019-11-04T20:44:20Z",
    launch_specifications=[
        {
            "instance_type": "m4.10xlarge",
            "ami": "ami-1234",
            "spot_price": "2.793",
            "placement_tenancy": "dedicated",
            "iam_instance_profile_arn": example["arn"],
        },
        {
            "instance_type": "m4.4xlarge",
            "ami": "ami-5678",
            "key_name": "my-key",
            "spot_price": "1.117",
            "iam_instance_profile_arn": example["arn"],
            "availability_zone": "us-west-1a",
            "subnet_id": "subnet-1234",
            "weighted_capacity": "35",
            "root_block_devices": [{
                "volume_size": 300,
                "volume_type": "gp2",
            }],
            "tags": {
                "Name": "spot-fleet-example",
            },
        },
    ])
Copy
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 {
		// Request a Spot fleet
		_, err := ec2.NewSpotFleetRequest(ctx, "cheap_compute", &ec2.SpotFleetRequestArgs{
			IamFleetRole:       pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
			SpotPrice:          pulumi.String("0.03"),
			AllocationStrategy: pulumi.String("diversified"),
			TargetCapacity:     pulumi.Int(6),
			ValidUntil:         pulumi.String("2019-11-04T20:44:20Z"),
			LaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{
				&ec2.SpotFleetRequestLaunchSpecificationArgs{
					InstanceType:          pulumi.String("m4.10xlarge"),
					Ami:                   pulumi.String("ami-1234"),
					SpotPrice:             pulumi.String("2.793"),
					PlacementTenancy:      pulumi.String("dedicated"),
					IamInstanceProfileArn: pulumi.Any(example.Arn),
				},
				&ec2.SpotFleetRequestLaunchSpecificationArgs{
					InstanceType:          pulumi.String("m4.4xlarge"),
					Ami:                   pulumi.String("ami-5678"),
					KeyName:               pulumi.String("my-key"),
					SpotPrice:             pulumi.String("1.117"),
					IamInstanceProfileArn: pulumi.Any(example.Arn),
					AvailabilityZone:      pulumi.String("us-west-1a"),
					SubnetId:              pulumi.String("subnet-1234"),
					WeightedCapacity:      pulumi.String("35"),
					RootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{
						&ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{
							VolumeSize: pulumi.Int(300),
							VolumeType: pulumi.String("gp2"),
						},
					},
					Tags: pulumi.StringMap{
						"Name": pulumi.String("spot-fleet-example"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    // Request a Spot fleet
    var cheapCompute = new Aws.Ec2.SpotFleetRequest("cheap_compute", new()
    {
        IamFleetRole = "arn:aws:iam::12345678:role/spot-fleet",
        SpotPrice = "0.03",
        AllocationStrategy = "diversified",
        TargetCapacity = 6,
        ValidUntil = "2019-11-04T20:44:20Z",
        LaunchSpecifications = new[]
        {
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
            {
                InstanceType = "m4.10xlarge",
                Ami = "ami-1234",
                SpotPrice = "2.793",
                PlacementTenancy = "dedicated",
                IamInstanceProfileArn = example.Arn,
            },
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
            {
                InstanceType = "m4.4xlarge",
                Ami = "ami-5678",
                KeyName = "my-key",
                SpotPrice = "1.117",
                IamInstanceProfileArn = example.Arn,
                AvailabilityZone = "us-west-1a",
                SubnetId = "subnet-1234",
                WeightedCapacity = "35",
                RootBlockDevices = new[]
                {
                    new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs
                    {
                        VolumeSize = 300,
                        VolumeType = "gp2",
                    },
                },
                Tags = 
                {
                    { "Name", "spot-fleet-example" },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.SpotFleetRequest;
import com.pulumi.aws.ec2.SpotFleetRequestArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;
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) {
        // Request a Spot fleet
        var cheapCompute = new SpotFleetRequest("cheapCompute", SpotFleetRequestArgs.builder()
            .iamFleetRole("arn:aws:iam::12345678:role/spot-fleet")
            .spotPrice("0.03")
            .allocationStrategy("diversified")
            .targetCapacity(6)
            .validUntil("2019-11-04T20:44:20Z")
            .launchSpecifications(            
                SpotFleetRequestLaunchSpecificationArgs.builder()
                    .instanceType("m4.10xlarge")
                    .ami("ami-1234")
                    .spotPrice("2.793")
                    .placementTenancy("dedicated")
                    .iamInstanceProfileArn(example.arn())
                    .build(),
                SpotFleetRequestLaunchSpecificationArgs.builder()
                    .instanceType("m4.4xlarge")
                    .ami("ami-5678")
                    .keyName("my-key")
                    .spotPrice("1.117")
                    .iamInstanceProfileArn(example.arn())
                    .availabilityZone("us-west-1a")
                    .subnetId("subnet-1234")
                    .weightedCapacity("35")
                    .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()
                        .volumeSize(300)
                        .volumeType("gp2")
                        .build())
                    .tags(Map.of("Name", "spot-fleet-example"))
                    .build())
            .build());

    }
}
Copy
resources:
  # Request a Spot fleet
  cheapCompute:
    type: aws:ec2:SpotFleetRequest
    name: cheap_compute
    properties:
      iamFleetRole: arn:aws:iam::12345678:role/spot-fleet
      spotPrice: '0.03'
      allocationStrategy: diversified
      targetCapacity: 6
      validUntil: 2019-11-04T20:44:20Z
      launchSpecifications:
        - instanceType: m4.10xlarge
          ami: ami-1234
          spotPrice: '2.793'
          placementTenancy: dedicated
          iamInstanceProfileArn: ${example.arn}
        - instanceType: m4.4xlarge
          ami: ami-5678
          keyName: my-key
          spotPrice: '1.117'
          iamInstanceProfileArn: ${example.arn}
          availabilityZone: us-west-1a
          subnetId: subnet-1234
          weightedCapacity: 35
          rootBlockDevices:
            - volumeSize: '300'
              volumeType: gp2
          tags:
            Name: spot-fleet-example
Copy

Using launch templates

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = new aws.ec2.LaunchTemplate("foo", {
    name: "launch-template",
    imageId: "ami-516b9131",
    instanceType: "m1.small",
    keyName: "some-key",
});
const fooSpotFleetRequest = new aws.ec2.SpotFleetRequest("foo", {
    iamFleetRole: "arn:aws:iam::12345678:role/spot-fleet",
    spotPrice: "0.005",
    targetCapacity: 2,
    validUntil: "2019-11-04T20:44:20Z",
    launchTemplateConfigs: [{
        launchTemplateSpecification: {
            id: foo.id,
            version: foo.latestVersion,
        },
    }],
}, {
    dependsOn: [test_attach],
});
Copy
import pulumi
import pulumi_aws as aws

foo = aws.ec2.LaunchTemplate("foo",
    name="launch-template",
    image_id="ami-516b9131",
    instance_type="m1.small",
    key_name="some-key")
foo_spot_fleet_request = aws.ec2.SpotFleetRequest("foo",
    iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet",
    spot_price="0.005",
    target_capacity=2,
    valid_until="2019-11-04T20:44:20Z",
    launch_template_configs=[{
        "launch_template_specification": {
            "id": foo.id,
            "version": foo.latest_version,
        },
    }],
    opts = pulumi.ResourceOptions(depends_on=[test_attach]))
Copy
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 {
		foo, err := ec2.NewLaunchTemplate(ctx, "foo", &ec2.LaunchTemplateArgs{
			Name:         pulumi.String("launch-template"),
			ImageId:      pulumi.String("ami-516b9131"),
			InstanceType: pulumi.String("m1.small"),
			KeyName:      pulumi.String("some-key"),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
			IamFleetRole:   pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
			SpotPrice:      pulumi.String("0.005"),
			TargetCapacity: pulumi.Int(2),
			ValidUntil:     pulumi.String("2019-11-04T20:44:20Z"),
			LaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{
				&ec2.SpotFleetRequestLaunchTemplateConfigArgs{
					LaunchTemplateSpecification: &ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{
						Id:      foo.ID(),
						Version: foo.LatestVersion,
					},
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			test_attach,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var foo = new Aws.Ec2.LaunchTemplate("foo", new()
    {
        Name = "launch-template",
        ImageId = "ami-516b9131",
        InstanceType = "m1.small",
        KeyName = "some-key",
    });

    var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest("foo", new()
    {
        IamFleetRole = "arn:aws:iam::12345678:role/spot-fleet",
        SpotPrice = "0.005",
        TargetCapacity = 2,
        ValidUntil = "2019-11-04T20:44:20Z",
        LaunchTemplateConfigs = new[]
        {
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs
            {
                LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs
                {
                    Id = foo.Id,
                    Version = foo.LatestVersion,
                },
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            test_attach,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.ec2.SpotFleetRequest;
import com.pulumi.aws.ec2.SpotFleetRequestArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
        var foo = new LaunchTemplate("foo", LaunchTemplateArgs.builder()
            .name("launch-template")
            .imageId("ami-516b9131")
            .instanceType("m1.small")
            .keyName("some-key")
            .build());

        var fooSpotFleetRequest = new SpotFleetRequest("fooSpotFleetRequest", SpotFleetRequestArgs.builder()
            .iamFleetRole("arn:aws:iam::12345678:role/spot-fleet")
            .spotPrice("0.005")
            .targetCapacity(2)
            .validUntil("2019-11-04T20:44:20Z")
            .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()
                .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()
                    .id(foo.id())
                    .version(foo.latestVersion())
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(test_attach)
                .build());

    }
}
Copy
resources:
  foo:
    type: aws:ec2:LaunchTemplate
    properties:
      name: launch-template
      imageId: ami-516b9131
      instanceType: m1.small
      keyName: some-key
  fooSpotFleetRequest:
    type: aws:ec2:SpotFleetRequest
    name: foo
    properties:
      iamFleetRole: arn:aws:iam::12345678:role/spot-fleet
      spotPrice: '0.005'
      targetCapacity: 2
      validUntil: 2019-11-04T20:44:20Z
      launchTemplateConfigs:
        - launchTemplateSpecification:
            id: ${foo.id}
            version: ${foo.latestVersion}
    options:
      dependsOn:
        - ${["test-attach"]}
Copy

NOTE: This provider does not support the functionality where multiple subnet_id or availability_zone parameters can be specified in the same launch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:

Using multiple launch specifications

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = new aws.ec2.SpotFleetRequest("foo", {
    iamFleetRole: "arn:aws:iam::12345678:role/spot-fleet",
    spotPrice: "0.005",
    targetCapacity: 2,
    validUntil: "2019-11-04T20:44:20Z",
    launchSpecifications: [
        {
            instanceType: "m1.small",
            ami: "ami-d06a90b0",
            keyName: "my-key",
            availabilityZone: "us-west-2a",
        },
        {
            instanceType: "m5.large",
            ami: "ami-d06a90b0",
            keyName: "my-key",
            availabilityZone: "us-west-2a",
        },
    ],
});
Copy
import pulumi
import pulumi_aws as aws

foo = aws.ec2.SpotFleetRequest("foo",
    iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet",
    spot_price="0.005",
    target_capacity=2,
    valid_until="2019-11-04T20:44:20Z",
    launch_specifications=[
        {
            "instance_type": "m1.small",
            "ami": "ami-d06a90b0",
            "key_name": "my-key",
            "availability_zone": "us-west-2a",
        },
        {
            "instance_type": "m5.large",
            "ami": "ami-d06a90b0",
            "key_name": "my-key",
            "availability_zone": "us-west-2a",
        },
    ])
Copy
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.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
			IamFleetRole:   pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
			SpotPrice:      pulumi.String("0.005"),
			TargetCapacity: pulumi.Int(2),
			ValidUntil:     pulumi.String("2019-11-04T20:44:20Z"),
			LaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{
				&ec2.SpotFleetRequestLaunchSpecificationArgs{
					InstanceType:     pulumi.String("m1.small"),
					Ami:              pulumi.String("ami-d06a90b0"),
					KeyName:          pulumi.String("my-key"),
					AvailabilityZone: pulumi.String("us-west-2a"),
				},
				&ec2.SpotFleetRequestLaunchSpecificationArgs{
					InstanceType:     pulumi.String("m5.large"),
					Ami:              pulumi.String("ami-d06a90b0"),
					KeyName:          pulumi.String("my-key"),
					AvailabilityZone: pulumi.String("us-west-2a"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var foo = new Aws.Ec2.SpotFleetRequest("foo", new()
    {
        IamFleetRole = "arn:aws:iam::12345678:role/spot-fleet",
        SpotPrice = "0.005",
        TargetCapacity = 2,
        ValidUntil = "2019-11-04T20:44:20Z",
        LaunchSpecifications = new[]
        {
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
            {
                InstanceType = "m1.small",
                Ami = "ami-d06a90b0",
                KeyName = "my-key",
                AvailabilityZone = "us-west-2a",
            },
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
            {
                InstanceType = "m5.large",
                Ami = "ami-d06a90b0",
                KeyName = "my-key",
                AvailabilityZone = "us-west-2a",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.SpotFleetRequest;
import com.pulumi.aws.ec2.SpotFleetRequestArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;
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) {
        var foo = new SpotFleetRequest("foo", SpotFleetRequestArgs.builder()
            .iamFleetRole("arn:aws:iam::12345678:role/spot-fleet")
            .spotPrice("0.005")
            .targetCapacity(2)
            .validUntil("2019-11-04T20:44:20Z")
            .launchSpecifications(            
                SpotFleetRequestLaunchSpecificationArgs.builder()
                    .instanceType("m1.small")
                    .ami("ami-d06a90b0")
                    .keyName("my-key")
                    .availabilityZone("us-west-2a")
                    .build(),
                SpotFleetRequestLaunchSpecificationArgs.builder()
                    .instanceType("m5.large")
                    .ami("ami-d06a90b0")
                    .keyName("my-key")
                    .availabilityZone("us-west-2a")
                    .build())
            .build());

    }
}
Copy
resources:
  foo:
    type: aws:ec2:SpotFleetRequest
    properties:
      iamFleetRole: arn:aws:iam::12345678:role/spot-fleet
      spotPrice: '0.005'
      targetCapacity: 2
      validUntil: 2019-11-04T20:44:20Z
      launchSpecifications:
        - instanceType: m1.small
          ami: ami-d06a90b0
          keyName: my-key
          availabilityZone: us-west-2a
        - instanceType: m5.large
          ami: ami-d06a90b0
          keyName: my-key
          availabilityZone: us-west-2a
Copy

In this example, we use a dynamic block to define zero or more launch_specification blocks, producing one for each element in the list of subnet ids.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const subnets = config.requireObject<any>("subnets");
const example = new aws.ec2.SpotFleetRequest("example", {
    launchSpecifications: .map(s => ({
        subnetId: s[1],
    })).map((v, k) => ({key: k, value: v})).map(entry => ({
        ami: "ami-1234",
        instanceType: "m4.4xlarge",
        subnetId: entry.value.subnetId,
        vpcSecurityGroupIds: "sg-123456",
        rootBlockDevices: [{
            volumeSize: 8,
            volumeType: "gp2",
            deleteOnTermination: true,
        }],
        tags: {
            Name: "Spot Node",
            tag_builder: "builder",
        },
    })),
    iamFleetRole: "arn:aws:iam::12345678:role/spot-fleet",
    targetCapacity: 3,
    validUntil: "2019-11-04T20:44:20Z",
    allocationStrategy: "lowestPrice",
    fleetType: "request",
    waitForFulfillment: true,
    terminateInstancesWithExpiration: true,
});
Copy
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
subnets = config.require_object("subnets")
example = aws.ec2.SpotFleetRequest("example",
    launch_specifications=[{
        "ami": "ami-1234",
        "instance_type": "m4.4xlarge",
        "subnet_id": entry["value"]["subnetId"],
        "vpc_security_group_ids": "sg-123456",
        "root_block_devices": [{
            "volume_size": 8,
            "volume_type": "gp2",
            "delete_on_termination": True,
        }],
        "tags": {
            "Name": "Spot Node",
            "tag_builder": "builder",
        },
    } for entry in [{"key": k, "value": v} for k, v in [{
        "subnetId": s[1],
    } for s in subnets]]],
    iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet",
    target_capacity=3,
    valid_until="2019-11-04T20:44:20Z",
    allocation_strategy="lowestPrice",
    fleet_type="request",
    wait_for_fulfillment=True,
    terminate_instances_with_expiration=True)
Copy
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var subnets = config.RequireObject<dynamic>("subnets");
    var example = new Aws.Ec2.SpotFleetRequest("example", new()
    {
        LaunchSpecifications = .Select(s => 
        {
            return 
            {
                { "subnetId", s[1] },
            };
        }).ToList().Select((v, k) => new { Key = k, Value = v }).Select(entry => 
        {
            return new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
            {
                Ami = "ami-1234",
                InstanceType = "m4.4xlarge",
                SubnetId = entry.Value.SubnetId,
                VpcSecurityGroupIds = "sg-123456",
                RootBlockDevices = new[]
                {
                    new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs
                    {
                        VolumeSize = 8,
                        VolumeType = "gp2",
                        DeleteOnTermination = true,
                    },
                },
                Tags = 
                {
                    { "Name", "Spot Node" },
                    { "tag_builder", "builder" },
                },
            };
        }).ToList(),
        IamFleetRole = "arn:aws:iam::12345678:role/spot-fleet",
        TargetCapacity = 3,
        ValidUntil = "2019-11-04T20:44:20Z",
        AllocationStrategy = "lowestPrice",
        FleetType = "request",
        WaitForFulfillment = true,
        TerminateInstancesWithExpiration = true,
    });

});
Copy
Coming soon!
Coming soon!

Using multiple launch configurations

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.ec2.getSubnets({
    filters: [{
        name: "vpc-id",
        values: [vpcId],
    }],
});
const foo = new aws.ec2.LaunchTemplate("foo", {
    name: "launch-template",
    imageId: "ami-516b9131",
    instanceType: "m1.small",
    keyName: "some-key",
});
const fooSpotFleetRequest = new aws.ec2.SpotFleetRequest("foo", {
    iamFleetRole: "arn:aws:iam::12345678:role/spot-fleet",
    spotPrice: "0.005",
    targetCapacity: 2,
    validUntil: "2019-11-04T20:44:20Z",
    launchTemplateConfigs: [{
        launchTemplateSpecification: {
            id: foo.id,
            version: foo.latestVersion,
        },
        overrides: [
            {
                subnetId: example.then(example => example.ids?.[0]),
            },
            {
                subnetId: example.then(example => example.ids?.[1]),
            },
            {
                subnetId: example.then(example => example.ids?.[2]),
            },
        ],
    }],
}, {
    dependsOn: [test_attach],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_subnets(filters=[{
    "name": "vpc-id",
    "values": [vpc_id],
}])
foo = aws.ec2.LaunchTemplate("foo",
    name="launch-template",
    image_id="ami-516b9131",
    instance_type="m1.small",
    key_name="some-key")
foo_spot_fleet_request = aws.ec2.SpotFleetRequest("foo",
    iam_fleet_role="arn:aws:iam::12345678:role/spot-fleet",
    spot_price="0.005",
    target_capacity=2,
    valid_until="2019-11-04T20:44:20Z",
    launch_template_configs=[{
        "launch_template_specification": {
            "id": foo.id,
            "version": foo.latest_version,
        },
        "overrides": [
            {
                "subnet_id": example.ids[0],
            },
            {
                "subnet_id": example.ids[1],
            },
            {
                "subnet_id": example.ids[2],
            },
        ],
    }],
    opts = pulumi.ResourceOptions(depends_on=[test_attach]))
Copy
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 {
example, err := ec2.GetSubnets(ctx, &ec2.GetSubnetsArgs{
Filters: []ec2.GetSubnetsFilter{
{
Name: "vpc-id",
Values: interface{}{
vpcId,
},
},
},
}, nil);
if err != nil {
return err
}
foo, err := ec2.NewLaunchTemplate(ctx, "foo", &ec2.LaunchTemplateArgs{
Name: pulumi.String("launch-template"),
ImageId: pulumi.String("ami-516b9131"),
InstanceType: pulumi.String("m1.small"),
KeyName: pulumi.String("some-key"),
})
if err != nil {
return err
}
_, err = ec2.NewSpotFleetRequest(ctx, "foo", &ec2.SpotFleetRequestArgs{
IamFleetRole: pulumi.String("arn:aws:iam::12345678:role/spot-fleet"),
SpotPrice: pulumi.String("0.005"),
TargetCapacity: pulumi.Int(2),
ValidUntil: pulumi.String("2019-11-04T20:44:20Z"),
LaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{
&ec2.SpotFleetRequestLaunchTemplateConfigArgs{
LaunchTemplateSpecification: &ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{
Id: foo.ID(),
Version: foo.LatestVersion,
},
Overrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{
&ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
SubnetId: pulumi.String(example.Ids[0]),
},
&ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
SubnetId: pulumi.String(example.Ids[1]),
},
&ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
SubnetId: pulumi.String(example.Ids[2]),
},
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
test_attach,
}))
if err != nil {
return err
}
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Ec2.GetSubnets.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs
            {
                Name = "vpc-id",
                Values = new[]
                {
                    vpcId,
                },
            },
        },
    });

    var foo = new Aws.Ec2.LaunchTemplate("foo", new()
    {
        Name = "launch-template",
        ImageId = "ami-516b9131",
        InstanceType = "m1.small",
        KeyName = "some-key",
    });

    var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest("foo", new()
    {
        IamFleetRole = "arn:aws:iam::12345678:role/spot-fleet",
        SpotPrice = "0.005",
        TargetCapacity = 2,
        ValidUntil = "2019-11-04T20:44:20Z",
        LaunchTemplateConfigs = new[]
        {
            new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs
            {
                LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs
                {
                    Id = foo.Id,
                    Version = foo.LatestVersion,
                },
                Overrides = new[]
                {
                    new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs
                    {
                        SubnetId = example.Apply(getSubnetsResult => getSubnetsResult.Ids[0]),
                    },
                    new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs
                    {
                        SubnetId = example.Apply(getSubnetsResult => getSubnetsResult.Ids[1]),
                    },
                    new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs
                    {
                        SubnetId = example.Apply(getSubnetsResult => getSubnetsResult.Ids[2]),
                    },
                },
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            test_attach,
        },
    });

});
Copy
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.GetSubnetsArgs;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.ec2.SpotFleetRequest;
import com.pulumi.aws.ec2.SpotFleetRequestArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;
import com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;
import com.pulumi.resources.CustomResourceOptions;
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.getSubnets(GetSubnetsArgs.builder()
            .filters(GetSubnetsFilterArgs.builder()
                .name("vpc-id")
                .values(vpcId)
                .build())
            .build());

        var foo = new LaunchTemplate("foo", LaunchTemplateArgs.builder()
            .name("launch-template")
            .imageId("ami-516b9131")
            .instanceType("m1.small")
            .keyName("some-key")
            .build());

        var fooSpotFleetRequest = new SpotFleetRequest("fooSpotFleetRequest", SpotFleetRequestArgs.builder()
            .iamFleetRole("arn:aws:iam::12345678:role/spot-fleet")
            .spotPrice("0.005")
            .targetCapacity(2)
            .validUntil("2019-11-04T20:44:20Z")
            .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()
                .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()
                    .id(foo.id())
                    .version(foo.latestVersion())
                    .build())
                .overrides(                
                    SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()
                        .subnetId(example.ids()[0])
                        .build(),
                    SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()
                        .subnetId(example.ids()[1])
                        .build(),
                    SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()
                        .subnetId(example.ids()[2])
                        .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(test_attach)
                .build());

    }
}
Copy
resources:
  foo:
    type: aws:ec2:LaunchTemplate
    properties:
      name: launch-template
      imageId: ami-516b9131
      instanceType: m1.small
      keyName: some-key
  fooSpotFleetRequest:
    type: aws:ec2:SpotFleetRequest
    name: foo
    properties:
      iamFleetRole: arn:aws:iam::12345678:role/spot-fleet
      spotPrice: '0.005'
      targetCapacity: 2
      validUntil: 2019-11-04T20:44:20Z
      launchTemplateConfigs:
        - launchTemplateSpecification:
            id: ${foo.id}
            version: ${foo.latestVersion}
          overrides:
            - subnetId: ${example.ids[0]}
            - subnetId: ${example.ids[1]}
            - subnetId: ${example.ids[2]}
    options:
      dependsOn:
        - ${["test-attach"]}
variables:
  example:
    fn::invoke:
      function: aws:ec2:getSubnets
      arguments:
        filters:
          - name: vpc-id
            values:
              - ${vpcId}
Copy

Create SpotFleetRequest Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SpotFleetRequest(name: string, args: SpotFleetRequestArgs, opts?: CustomResourceOptions);
@overload
def SpotFleetRequest(resource_name: str,
                     args: SpotFleetRequestArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def SpotFleetRequest(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     iam_fleet_role: Optional[str] = None,
                     target_capacity: Optional[int] = None,
                     on_demand_target_capacity: Optional[int] = None,
                     on_demand_allocation_strategy: Optional[str] = None,
                     excess_capacity_termination_policy: Optional[str] = None,
                     instance_interruption_behaviour: Optional[str] = None,
                     instance_pools_to_use_count: Optional[int] = None,
                     launch_specifications: Optional[Sequence[SpotFleetRequestLaunchSpecificationArgs]] = None,
                     launch_template_configs: Optional[Sequence[SpotFleetRequestLaunchTemplateConfigArgs]] = None,
                     spot_maintenance_strategies: Optional[SpotFleetRequestSpotMaintenanceStrategiesArgs] = None,
                     replace_unhealthy_instances: Optional[bool] = None,
                     on_demand_max_total_price: Optional[str] = None,
                     fleet_type: Optional[str] = None,
                     allocation_strategy: Optional[str] = None,
                     load_balancers: Optional[Sequence[str]] = None,
                     spot_price: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     context: Optional[str] = None,
                     target_capacity_unit_type: Optional[str] = None,
                     target_group_arns: Optional[Sequence[str]] = None,
                     terminate_instances_on_delete: Optional[str] = None,
                     terminate_instances_with_expiration: Optional[bool] = None,
                     valid_from: Optional[str] = None,
                     valid_until: Optional[str] = None,
                     wait_for_fulfillment: Optional[bool] = None)
func NewSpotFleetRequest(ctx *Context, name string, args SpotFleetRequestArgs, opts ...ResourceOption) (*SpotFleetRequest, error)
public SpotFleetRequest(string name, SpotFleetRequestArgs args, CustomResourceOptions? opts = null)
public SpotFleetRequest(String name, SpotFleetRequestArgs args)
public SpotFleetRequest(String name, SpotFleetRequestArgs args, CustomResourceOptions options)
type: aws:ec2:SpotFleetRequest
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SpotFleetRequestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SpotFleetRequestArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SpotFleetRequestArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SpotFleetRequestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SpotFleetRequestArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var spotFleetRequestResource = new Aws.Ec2.SpotFleetRequest("spotFleetRequestResource", new()
{
    IamFleetRole = "string",
    TargetCapacity = 0,
    OnDemandTargetCapacity = 0,
    OnDemandAllocationStrategy = "string",
    ExcessCapacityTerminationPolicy = "string",
    InstanceInterruptionBehaviour = "string",
    InstancePoolsToUseCount = 0,
    LaunchSpecifications = new[]
    {
        new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs
        {
            InstanceType = "string",
            Ami = "string",
            Monitoring = false,
            PlacementGroup = "string",
            EbsOptimized = false,
            EphemeralBlockDevices = new[]
            {
                new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceArgs
                {
                    DeviceName = "string",
                    VirtualName = "string",
                },
            },
            IamInstanceProfile = "string",
            IamInstanceProfileArn = "string",
            AvailabilityZone = "string",
            KeyName = "string",
            AssociatePublicIpAddress = false,
            EbsBlockDevices = new[]
            {
                new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationEbsBlockDeviceArgs
                {
                    DeviceName = "string",
                    DeleteOnTermination = false,
                    Encrypted = false,
                    Iops = 0,
                    KmsKeyId = "string",
                    SnapshotId = "string",
                    Throughput = 0,
                    VolumeSize = 0,
                    VolumeType = "string",
                },
            },
            PlacementTenancy = "string",
            RootBlockDevices = new[]
            {
                new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs
                {
                    DeleteOnTermination = false,
                    Encrypted = false,
                    Iops = 0,
                    KmsKeyId = "string",
                    Throughput = 0,
                    VolumeSize = 0,
                    VolumeType = "string",
                },
            },
            SpotPrice = "string",
            SubnetId = "string",
            Tags = 
            {
                { "string", "string" },
            },
            UserData = "string",
            VpcSecurityGroupIds = new[]
            {
                "string",
            },
            WeightedCapacity = "string",
        },
    },
    LaunchTemplateConfigs = new[]
    {
        new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs
        {
            LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs
            {
                Id = "string",
                Name = "string",
                Version = "string",
            },
            Overrides = new[]
            {
                new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs
                {
                    AvailabilityZone = "string",
                    InstanceRequirements = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsArgs
                    {
                        AcceleratorCount = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCountArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        AcceleratorManufacturers = new[]
                        {
                            "string",
                        },
                        AcceleratorNames = new[]
                        {
                            "string",
                        },
                        AcceleratorTotalMemoryMib = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMibArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        AcceleratorTypes = new[]
                        {
                            "string",
                        },
                        AllowedInstanceTypes = new[]
                        {
                            "string",
                        },
                        BareMetal = "string",
                        BaselineEbsBandwidthMbps = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbpsArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        BurstablePerformance = "string",
                        CpuManufacturers = new[]
                        {
                            "string",
                        },
                        ExcludedInstanceTypes = new[]
                        {
                            "string",
                        },
                        InstanceGenerations = new[]
                        {
                            "string",
                        },
                        LocalStorage = "string",
                        LocalStorageTypes = new[]
                        {
                            "string",
                        },
                        MemoryGibPerVcpu = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpuArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        MemoryMib = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMibArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        NetworkBandwidthGbps = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbpsArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        NetworkInterfaceCount = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCountArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        OnDemandMaxPricePercentageOverLowestPrice = 0,
                        RequireHibernateSupport = false,
                        SpotMaxPricePercentageOverLowestPrice = 0,
                        TotalLocalStorageGb = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGbArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                        VcpuCount = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCountArgs
                        {
                            Max = 0,
                            Min = 0,
                        },
                    },
                    InstanceType = "string",
                    Priority = 0,
                    SpotPrice = "string",
                    SubnetId = "string",
                    WeightedCapacity = 0,
                },
            },
        },
    },
    SpotMaintenanceStrategies = new Aws.Ec2.Inputs.SpotFleetRequestSpotMaintenanceStrategiesArgs
    {
        CapacityRebalance = new Aws.Ec2.Inputs.SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceArgs
        {
            ReplacementStrategy = "string",
        },
    },
    ReplaceUnhealthyInstances = false,
    OnDemandMaxTotalPrice = "string",
    FleetType = "string",
    AllocationStrategy = "string",
    LoadBalancers = new[]
    {
        "string",
    },
    SpotPrice = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Context = "string",
    TargetCapacityUnitType = "string",
    TargetGroupArns = new[]
    {
        "string",
    },
    TerminateInstancesOnDelete = "string",
    TerminateInstancesWithExpiration = false,
    ValidFrom = "string",
    ValidUntil = "string",
    WaitForFulfillment = false,
});
Copy
example, err := ec2.NewSpotFleetRequest(ctx, "spotFleetRequestResource", &ec2.SpotFleetRequestArgs{
	IamFleetRole:                    pulumi.String("string"),
	TargetCapacity:                  pulumi.Int(0),
	OnDemandTargetCapacity:          pulumi.Int(0),
	OnDemandAllocationStrategy:      pulumi.String("string"),
	ExcessCapacityTerminationPolicy: pulumi.String("string"),
	InstanceInterruptionBehaviour:   pulumi.String("string"),
	InstancePoolsToUseCount:         pulumi.Int(0),
	LaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{
		&ec2.SpotFleetRequestLaunchSpecificationArgs{
			InstanceType:   pulumi.String("string"),
			Ami:            pulumi.String("string"),
			Monitoring:     pulumi.Bool(false),
			PlacementGroup: pulumi.String("string"),
			EbsOptimized:   pulumi.Bool(false),
			EphemeralBlockDevices: ec2.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceArray{
				&ec2.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceArgs{
					DeviceName:  pulumi.String("string"),
					VirtualName: pulumi.String("string"),
				},
			},
			IamInstanceProfile:       pulumi.String("string"),
			IamInstanceProfileArn:    pulumi.String("string"),
			AvailabilityZone:         pulumi.String("string"),
			KeyName:                  pulumi.String("string"),
			AssociatePublicIpAddress: pulumi.Bool(false),
			EbsBlockDevices: ec2.SpotFleetRequestLaunchSpecificationEbsBlockDeviceArray{
				&ec2.SpotFleetRequestLaunchSpecificationEbsBlockDeviceArgs{
					DeviceName:          pulumi.String("string"),
					DeleteOnTermination: pulumi.Bool(false),
					Encrypted:           pulumi.Bool(false),
					Iops:                pulumi.Int(0),
					KmsKeyId:            pulumi.String("string"),
					SnapshotId:          pulumi.String("string"),
					Throughput:          pulumi.Int(0),
					VolumeSize:          pulumi.Int(0),
					VolumeType:          pulumi.String("string"),
				},
			},
			PlacementTenancy: pulumi.String("string"),
			RootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{
				&ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{
					DeleteOnTermination: pulumi.Bool(false),
					Encrypted:           pulumi.Bool(false),
					Iops:                pulumi.Int(0),
					KmsKeyId:            pulumi.String("string"),
					Throughput:          pulumi.Int(0),
					VolumeSize:          pulumi.Int(0),
					VolumeType:          pulumi.String("string"),
				},
			},
			SpotPrice: pulumi.String("string"),
			SubnetId:  pulumi.String("string"),
			Tags: pulumi.StringMap{
				"string": pulumi.String("string"),
			},
			UserData: pulumi.String("string"),
			VpcSecurityGroupIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			WeightedCapacity: pulumi.String("string"),
		},
	},
	LaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{
		&ec2.SpotFleetRequestLaunchTemplateConfigArgs{
			LaunchTemplateSpecification: &ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{
				Id:      pulumi.String("string"),
				Name:    pulumi.String("string"),
				Version: pulumi.String("string"),
			},
			Overrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{
				&ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{
					AvailabilityZone: pulumi.String("string"),
					InstanceRequirements: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsArgs{
						AcceleratorCount: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCountArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
						AcceleratorManufacturers: pulumi.StringArray{
							pulumi.String("string"),
						},
						AcceleratorNames: pulumi.StringArray{
							pulumi.String("string"),
						},
						AcceleratorTotalMemoryMib: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMibArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
						AcceleratorTypes: pulumi.StringArray{
							pulumi.String("string"),
						},
						AllowedInstanceTypes: pulumi.StringArray{
							pulumi.String("string"),
						},
						BareMetal: pulumi.String("string"),
						BaselineEbsBandwidthMbps: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbpsArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
						BurstablePerformance: pulumi.String("string"),
						CpuManufacturers: pulumi.StringArray{
							pulumi.String("string"),
						},
						ExcludedInstanceTypes: pulumi.StringArray{
							pulumi.String("string"),
						},
						InstanceGenerations: pulumi.StringArray{
							pulumi.String("string"),
						},
						LocalStorage: pulumi.String("string"),
						LocalStorageTypes: pulumi.StringArray{
							pulumi.String("string"),
						},
						MemoryGibPerVcpu: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpuArgs{
							Max: pulumi.Float64(0),
							Min: pulumi.Float64(0),
						},
						MemoryMib: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMibArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
						NetworkBandwidthGbps: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbpsArgs{
							Max: pulumi.Float64(0),
							Min: pulumi.Float64(0),
						},
						NetworkInterfaceCount: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCountArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
						OnDemandMaxPricePercentageOverLowestPrice: pulumi.Int(0),
						RequireHibernateSupport:                   pulumi.Bool(false),
						SpotMaxPricePercentageOverLowestPrice:     pulumi.Int(0),
						TotalLocalStorageGb: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGbArgs{
							Max: pulumi.Float64(0),
							Min: pulumi.Float64(0),
						},
						VcpuCount: &ec2.SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCountArgs{
							Max: pulumi.Int(0),
							Min: pulumi.Int(0),
						},
					},
					InstanceType:     pulumi.String("string"),
					Priority:         pulumi.Float64(0),
					SpotPrice:        pulumi.String("string"),
					SubnetId:         pulumi.String("string"),
					WeightedCapacity: pulumi.Float64(0),
				},
			},
		},
	},
	SpotMaintenanceStrategies: &ec2.SpotFleetRequestSpotMaintenanceStrategiesArgs{
		CapacityRebalance: &ec2.SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceArgs{
			ReplacementStrategy: pulumi.String("string"),
		},
	},
	ReplaceUnhealthyInstances: pulumi.Bool(false),
	OnDemandMaxTotalPrice:     pulumi.String("string"),
	FleetType:                 pulumi.String("string"),
	AllocationStrategy:        pulumi.String("string"),
	LoadBalancers: pulumi.StringArray{
		pulumi.String("string"),
	},
	SpotPrice: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Context:                pulumi.String("string"),
	TargetCapacityUnitType: pulumi.String("string"),
	TargetGroupArns: pulumi.StringArray{
		pulumi.String("string"),
	},
	TerminateInstancesOnDelete:       pulumi.String("string"),
	TerminateInstancesWithExpiration: pulumi.Bool(false),
	ValidFrom:                        pulumi.String("string"),
	ValidUntil:                       pulumi.String("string"),
	WaitForFulfillment:               pulumi.Bool(false),
})
Copy
var spotFleetRequestResource = new SpotFleetRequest("spotFleetRequestResource", SpotFleetRequestArgs.builder()
    .iamFleetRole("string")
    .targetCapacity(0)
    .onDemandTargetCapacity(0)
    .onDemandAllocationStrategy("string")
    .excessCapacityTerminationPolicy("string")
    .instanceInterruptionBehaviour("string")
    .instancePoolsToUseCount(0)
    .launchSpecifications(SpotFleetRequestLaunchSpecificationArgs.builder()
        .instanceType("string")
        .ami("string")
        .monitoring(false)
        .placementGroup("string")
        .ebsOptimized(false)
        .ephemeralBlockDevices(SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceArgs.builder()
            .deviceName("string")
            .virtualName("string")
            .build())
        .iamInstanceProfile("string")
        .iamInstanceProfileArn("string")
        .availabilityZone("string")
        .keyName("string")
        .associatePublicIpAddress(false)
        .ebsBlockDevices(SpotFleetRequestLaunchSpecificationEbsBlockDeviceArgs.builder()
            .deviceName("string")
            .deleteOnTermination(false)
            .encrypted(false)
            .iops(0)
            .kmsKeyId("string")
            .snapshotId("string")
            .throughput(0)
            .volumeSize(0)
            .volumeType("string")
            .build())
        .placementTenancy("string")
        .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()
            .deleteOnTermination(false)
            .encrypted(false)
            .iops(0)
            .kmsKeyId("string")
            .throughput(0)
            .volumeSize(0)
            .volumeType("string")
            .build())
        .spotPrice("string")
        .subnetId("string")
        .tags(Map.of("string", "string"))
        .userData("string")
        .vpcSecurityGroupIds("string")
        .weightedCapacity("string")
        .build())
    .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()
        .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()
            .id("string")
            .name("string")
            .version("string")
            .build())
        .overrides(SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()
            .availabilityZone("string")
            .instanceRequirements(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsArgs.builder()
                .acceleratorCount(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCountArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .acceleratorManufacturers("string")
                .acceleratorNames("string")
                .acceleratorTotalMemoryMib(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMibArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .acceleratorTypes("string")
                .allowedInstanceTypes("string")
                .bareMetal("string")
                .baselineEbsBandwidthMbps(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbpsArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .burstablePerformance("string")
                .cpuManufacturers("string")
                .excludedInstanceTypes("string")
                .instanceGenerations("string")
                .localStorage("string")
                .localStorageTypes("string")
                .memoryGibPerVcpu(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpuArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .memoryMib(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMibArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .networkBandwidthGbps(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbpsArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .networkInterfaceCount(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCountArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .onDemandMaxPricePercentageOverLowestPrice(0)
                .requireHibernateSupport(false)
                .spotMaxPricePercentageOverLowestPrice(0)
                .totalLocalStorageGb(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGbArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .vcpuCount(SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCountArgs.builder()
                    .max(0)
                    .min(0)
                    .build())
                .build())
            .instanceType("string")
            .priority(0)
            .spotPrice("string")
            .subnetId("string")
            .weightedCapacity(0)
            .build())
        .build())
    .spotMaintenanceStrategies(SpotFleetRequestSpotMaintenanceStrategiesArgs.builder()
        .capacityRebalance(SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceArgs.builder()
            .replacementStrategy("string")
            .build())
        .build())
    .replaceUnhealthyInstances(false)
    .onDemandMaxTotalPrice("string")
    .fleetType("string")
    .allocationStrategy("string")
    .loadBalancers("string")
    .spotPrice("string")
    .tags(Map.of("string", "string"))
    .context("string")
    .targetCapacityUnitType("string")
    .targetGroupArns("string")
    .terminateInstancesOnDelete("string")
    .terminateInstancesWithExpiration(false)
    .validFrom("string")
    .validUntil("string")
    .waitForFulfillment(false)
    .build());
Copy
spot_fleet_request_resource = aws.ec2.SpotFleetRequest("spotFleetRequestResource",
    iam_fleet_role="string",
    target_capacity=0,
    on_demand_target_capacity=0,
    on_demand_allocation_strategy="string",
    excess_capacity_termination_policy="string",
    instance_interruption_behaviour="string",
    instance_pools_to_use_count=0,
    launch_specifications=[{
        "instance_type": "string",
        "ami": "string",
        "monitoring": False,
        "placement_group": "string",
        "ebs_optimized": False,
        "ephemeral_block_devices": [{
            "device_name": "string",
            "virtual_name": "string",
        }],
        "iam_instance_profile": "string",
        "iam_instance_profile_arn": "string",
        "availability_zone": "string",
        "key_name": "string",
        "associate_public_ip_address": False,
        "ebs_block_devices": [{
            "device_name": "string",
            "delete_on_termination": False,
            "encrypted": False,
            "iops": 0,
            "kms_key_id": "string",
            "snapshot_id": "string",
            "throughput": 0,
            "volume_size": 0,
            "volume_type": "string",
        }],
        "placement_tenancy": "string",
        "root_block_devices": [{
            "delete_on_termination": False,
            "encrypted": False,
            "iops": 0,
            "kms_key_id": "string",
            "throughput": 0,
            "volume_size": 0,
            "volume_type": "string",
        }],
        "spot_price": "string",
        "subnet_id": "string",
        "tags": {
            "string": "string",
        },
        "user_data": "string",
        "vpc_security_group_ids": ["string"],
        "weighted_capacity": "string",
    }],
    launch_template_configs=[{
        "launch_template_specification": {
            "id": "string",
            "name": "string",
            "version": "string",
        },
        "overrides": [{
            "availability_zone": "string",
            "instance_requirements": {
                "accelerator_count": {
                    "max": 0,
                    "min": 0,
                },
                "accelerator_manufacturers": ["string"],
                "accelerator_names": ["string"],
                "accelerator_total_memory_mib": {
                    "max": 0,
                    "min": 0,
                },
                "accelerator_types": ["string"],
                "allowed_instance_types": ["string"],
                "bare_metal": "string",
                "baseline_ebs_bandwidth_mbps": {
                    "max": 0,
                    "min": 0,
                },
                "burstable_performance": "string",
                "cpu_manufacturers": ["string"],
                "excluded_instance_types": ["string"],
                "instance_generations": ["string"],
                "local_storage": "string",
                "local_storage_types": ["string"],
                "memory_gib_per_vcpu": {
                    "max": 0,
                    "min": 0,
                },
                "memory_mib": {
                    "max": 0,
                    "min": 0,
                },
                "network_bandwidth_gbps": {
                    "max": 0,
                    "min": 0,
                },
                "network_interface_count": {
                    "max": 0,
                    "min": 0,
                },
                "on_demand_max_price_percentage_over_lowest_price": 0,
                "require_hibernate_support": False,
                "spot_max_price_percentage_over_lowest_price": 0,
                "total_local_storage_gb": {
                    "max": 0,
                    "min": 0,
                },
                "vcpu_count": {
                    "max": 0,
                    "min": 0,
                },
            },
            "instance_type": "string",
            "priority": 0,
            "spot_price": "string",
            "subnet_id": "string",
            "weighted_capacity": 0,
        }],
    }],
    spot_maintenance_strategies={
        "capacity_rebalance": {
            "replacement_strategy": "string",
        },
    },
    replace_unhealthy_instances=False,
    on_demand_max_total_price="string",
    fleet_type="string",
    allocation_strategy="string",
    load_balancers=["string"],
    spot_price="string",
    tags={
        "string": "string",
    },
    context="string",
    target_capacity_unit_type="string",
    target_group_arns=["string"],
    terminate_instances_on_delete="string",
    terminate_instances_with_expiration=False,
    valid_from="string",
    valid_until="string",
    wait_for_fulfillment=False)
Copy
const spotFleetRequestResource = new aws.ec2.SpotFleetRequest("spotFleetRequestResource", {
    iamFleetRole: "string",
    targetCapacity: 0,
    onDemandTargetCapacity: 0,
    onDemandAllocationStrategy: "string",
    excessCapacityTerminationPolicy: "string",
    instanceInterruptionBehaviour: "string",
    instancePoolsToUseCount: 0,
    launchSpecifications: [{
        instanceType: "string",
        ami: "string",
        monitoring: false,
        placementGroup: "string",
        ebsOptimized: false,
        ephemeralBlockDevices: [{
            deviceName: "string",
            virtualName: "string",
        }],
        iamInstanceProfile: "string",
        iamInstanceProfileArn: "string",
        availabilityZone: "string",
        keyName: "string",
        associatePublicIpAddress: false,
        ebsBlockDevices: [{
            deviceName: "string",
            deleteOnTermination: false,
            encrypted: false,
            iops: 0,
            kmsKeyId: "string",
            snapshotId: "string",
            throughput: 0,
            volumeSize: 0,
            volumeType: "string",
        }],
        placementTenancy: "string",
        rootBlockDevices: [{
            deleteOnTermination: false,
            encrypted: false,
            iops: 0,
            kmsKeyId: "string",
            throughput: 0,
            volumeSize: 0,
            volumeType: "string",
        }],
        spotPrice: "string",
        subnetId: "string",
        tags: {
            string: "string",
        },
        userData: "string",
        vpcSecurityGroupIds: ["string"],
        weightedCapacity: "string",
    }],
    launchTemplateConfigs: [{
        launchTemplateSpecification: {
            id: "string",
            name: "string",
            version: "string",
        },
        overrides: [{
            availabilityZone: "string",
            instanceRequirements: {
                acceleratorCount: {
                    max: 0,
                    min: 0,
                },
                acceleratorManufacturers: ["string"],
                acceleratorNames: ["string"],
                acceleratorTotalMemoryMib: {
                    max: 0,
                    min: 0,
                },
                acceleratorTypes: ["string"],
                allowedInstanceTypes: ["string"],
                bareMetal: "string",
                baselineEbsBandwidthMbps: {
                    max: 0,
                    min: 0,
                },
                burstablePerformance: "string",
                cpuManufacturers: ["string"],
                excludedInstanceTypes: ["string"],
                instanceGenerations: ["string"],
                localStorage: "string",
                localStorageTypes: ["string"],
                memoryGibPerVcpu: {
                    max: 0,
                    min: 0,
                },
                memoryMib: {
                    max: 0,
                    min: 0,
                },
                networkBandwidthGbps: {
                    max: 0,
                    min: 0,
                },
                networkInterfaceCount: {
                    max: 0,
                    min: 0,
                },
                onDemandMaxPricePercentageOverLowestPrice: 0,
                requireHibernateSupport: false,
                spotMaxPricePercentageOverLowestPrice: 0,
                totalLocalStorageGb: {
                    max: 0,
                    min: 0,
                },
                vcpuCount: {
                    max: 0,
                    min: 0,
                },
            },
            instanceType: "string",
            priority: 0,
            spotPrice: "string",
            subnetId: "string",
            weightedCapacity: 0,
        }],
    }],
    spotMaintenanceStrategies: {
        capacityRebalance: {
            replacementStrategy: "string",
        },
    },
    replaceUnhealthyInstances: false,
    onDemandMaxTotalPrice: "string",
    fleetType: "string",
    allocationStrategy: "string",
    loadBalancers: ["string"],
    spotPrice: "string",
    tags: {
        string: "string",
    },
    context: "string",
    targetCapacityUnitType: "string",
    targetGroupArns: ["string"],
    terminateInstancesOnDelete: "string",
    terminateInstancesWithExpiration: false,
    validFrom: "string",
    validUntil: "string",
    waitForFulfillment: false,
});
Copy
type: aws:ec2:SpotFleetRequest
properties:
    allocationStrategy: string
    context: string
    excessCapacityTerminationPolicy: string
    fleetType: string
    iamFleetRole: string
    instanceInterruptionBehaviour: string
    instancePoolsToUseCount: 0
    launchSpecifications:
        - ami: string
          associatePublicIpAddress: false
          availabilityZone: string
          ebsBlockDevices:
            - deleteOnTermination: false
              deviceName: string
              encrypted: false
              iops: 0
              kmsKeyId: string
              snapshotId: string
              throughput: 0
              volumeSize: 0
              volumeType: string
          ebsOptimized: false
          ephemeralBlockDevices:
            - deviceName: string
              virtualName: string
          iamInstanceProfile: string
          iamInstanceProfileArn: string
          instanceType: string
          keyName: string
          monitoring: false
          placementGroup: string
          placementTenancy: string
          rootBlockDevices:
            - deleteOnTermination: false
              encrypted: false
              iops: 0
              kmsKeyId: string
              throughput: 0
              volumeSize: 0
              volumeType: string
          spotPrice: string
          subnetId: string
          tags:
            string: string
          userData: string
          vpcSecurityGroupIds:
            - string
          weightedCapacity: string
    launchTemplateConfigs:
        - launchTemplateSpecification:
            id: string
            name: string
            version: string
          overrides:
            - availabilityZone: string
              instanceRequirements:
                acceleratorCount:
                    max: 0
                    min: 0
                acceleratorManufacturers:
                    - string
                acceleratorNames:
                    - string
                acceleratorTotalMemoryMib:
                    max: 0
                    min: 0
                acceleratorTypes:
                    - string
                allowedInstanceTypes:
                    - string
                bareMetal: string
                baselineEbsBandwidthMbps:
                    max: 0
                    min: 0
                burstablePerformance: string
                cpuManufacturers:
                    - string
                excludedInstanceTypes:
                    - string
                instanceGenerations:
                    - string
                localStorage: string
                localStorageTypes:
                    - string
                memoryGibPerVcpu:
                    max: 0
                    min: 0
                memoryMib:
                    max: 0
                    min: 0
                networkBandwidthGbps:
                    max: 0
                    min: 0
                networkInterfaceCount:
                    max: 0
                    min: 0
                onDemandMaxPricePercentageOverLowestPrice: 0
                requireHibernateSupport: false
                spotMaxPricePercentageOverLowestPrice: 0
                totalLocalStorageGb:
                    max: 0
                    min: 0
                vcpuCount:
                    max: 0
                    min: 0
              instanceType: string
              priority: 0
              spotPrice: string
              subnetId: string
              weightedCapacity: 0
    loadBalancers:
        - string
    onDemandAllocationStrategy: string
    onDemandMaxTotalPrice: string
    onDemandTargetCapacity: 0
    replaceUnhealthyInstances: false
    spotMaintenanceStrategies:
        capacityRebalance:
            replacementStrategy: string
    spotPrice: string
    tags:
        string: string
    targetCapacity: 0
    targetCapacityUnitType: string
    targetGroupArns:
        - string
    terminateInstancesOnDelete: string
    terminateInstancesWithExpiration: false
    validFrom: string
    validUntil: string
    waitForFulfillment: false
Copy

SpotFleetRequest Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SpotFleetRequest resource accepts the following input properties:

IamFleetRole
This property is required.
Changes to this property will trigger replacement.
string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
TargetCapacity This property is required. int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
AllocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
Context Changes to this property will trigger replacement. string
Reserved.
ExcessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
FleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
InstanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
InstancePoolsToUseCount Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
LaunchSpecifications Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecification>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

LaunchTemplateConfigs Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfig>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
LoadBalancers Changes to this property will trigger replacement. List<string>
A list of elastic load balancer names to add to the Spot fleet.
OnDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
OnDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
OnDemandTargetCapacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
ReplaceUnhealthyInstances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
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.
TargetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
TargetGroupArns Changes to this property will trigger replacement. List<string>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
TerminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
TerminateInstancesWithExpiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
ValidFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
WaitForFulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
IamFleetRole
This property is required.
Changes to this property will trigger replacement.
string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
TargetCapacity This property is required. int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
AllocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
Context Changes to this property will trigger replacement. string
Reserved.
ExcessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
FleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
InstanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
InstancePoolsToUseCount Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
LaunchSpecifications Changes to this property will trigger replacement. []SpotFleetRequestLaunchSpecificationArgs

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

LaunchTemplateConfigs Changes to this property will trigger replacement. []SpotFleetRequestLaunchTemplateConfigArgs
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
LoadBalancers Changes to this property will trigger replacement. []string
A list of elastic load balancer names to add to the Spot fleet.
OnDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
OnDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
OnDemandTargetCapacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
ReplaceUnhealthyInstances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategiesArgs
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
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.
TargetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
TargetGroupArns Changes to this property will trigger replacement. []string
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
TerminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
TerminateInstancesWithExpiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
ValidFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
WaitForFulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
iamFleetRole
This property is required.
Changes to this property will trigger replacement.
String
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
targetCapacity This property is required. Integer
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
allocationStrategy Changes to this property will trigger replacement. String
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
context Changes to this property will trigger replacement. String
Reserved.
excessCapacityTerminationPolicy String
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. String
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
instanceInterruptionBehaviour Changes to this property will trigger replacement. String
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. Integer
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecification>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfig>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. List<String>
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. String
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. String
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity Integer
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. Boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
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.
targetCapacityUnitType Changes to this property will trigger replacement. String
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. List<String>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete String
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. Boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. String
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. String
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment Boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
iamFleetRole
This property is required.
Changes to this property will trigger replacement.
string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
targetCapacity This property is required. number
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
allocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
context Changes to this property will trigger replacement. string
Reserved.
excessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
instanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. number
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. SpotFleetRequestLaunchSpecification[]

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfig[]
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. string[]
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity number
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
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.
targetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. string[]
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
iam_fleet_role
This property is required.
Changes to this property will trigger replacement.
str
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
target_capacity This property is required. int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
allocation_strategy Changes to this property will trigger replacement. str
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
context Changes to this property will trigger replacement. str
Reserved.
excess_capacity_termination_policy str
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleet_type Changes to this property will trigger replacement. str
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
instance_interruption_behaviour Changes to this property will trigger replacement. str
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instance_pools_to_use_count Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launch_specifications Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchSpecificationArgs]

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launch_template_configs Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchTemplateConfigArgs]
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
load_balancers Changes to this property will trigger replacement. Sequence[str]
A list of elastic load balancer names to add to the Spot fleet.
on_demand_allocation_strategy Changes to this property will trigger replacement. str
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
on_demand_max_total_price Changes to this property will trigger replacement. str
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
on_demand_target_capacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replace_unhealthy_instances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spot_maintenance_strategies SpotFleetRequestSpotMaintenanceStrategiesArgs
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spot_price Changes to this property will trigger replacement. str
The maximum bid price per unit hour.
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.
target_capacity_unit_type Changes to this property will trigger replacement. str
The unit for the target capacity. This can only be done with instance_requirements defined
target_group_arns Changes to this property will trigger replacement. Sequence[str]
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminate_instances_on_delete str
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminate_instances_with_expiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
valid_from Changes to this property will trigger replacement. str
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until Changes to this property will trigger replacement. str
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
wait_for_fulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
iamFleetRole
This property is required.
Changes to this property will trigger replacement.
String
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
targetCapacity This property is required. Number
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
allocationStrategy Changes to this property will trigger replacement. String
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
context Changes to this property will trigger replacement. String
Reserved.
excessCapacityTerminationPolicy String
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. String
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
instanceInterruptionBehaviour Changes to this property will trigger replacement. String
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. Number
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. List<Property Map>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. List<Property Map>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. List<String>
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. String
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. String
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity Number
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. Boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies Property Map
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
tags Map<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.
targetCapacityUnitType Changes to this property will trigger replacement. String
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. List<String>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete String
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. Boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. String
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. String
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment Boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.

Outputs

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

ClientToken string
Id string
The provider-assigned unique ID for this managed resource.
SpotRequestState string
The state of the Spot fleet request.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

ClientToken string
Id string
The provider-assigned unique ID for this managed resource.
SpotRequestState string
The state of the Spot fleet request.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

clientToken String
id String
The provider-assigned unique ID for this managed resource.
spotRequestState String
The state of the Spot fleet request.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

clientToken string
id string
The provider-assigned unique ID for this managed resource.
spotRequestState string
The state of the Spot fleet request.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

client_token str
id str
The provider-assigned unique ID for this managed resource.
spot_request_state str
The state of the Spot fleet request.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

clientToken String
id String
The provider-assigned unique ID for this managed resource.
spotRequestState String
The state of the Spot fleet request.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing SpotFleetRequest Resource

Get an existing SpotFleetRequest 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?: SpotFleetRequestState, opts?: CustomResourceOptions): SpotFleetRequest
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allocation_strategy: Optional[str] = None,
        client_token: Optional[str] = None,
        context: Optional[str] = None,
        excess_capacity_termination_policy: Optional[str] = None,
        fleet_type: Optional[str] = None,
        iam_fleet_role: Optional[str] = None,
        instance_interruption_behaviour: Optional[str] = None,
        instance_pools_to_use_count: Optional[int] = None,
        launch_specifications: Optional[Sequence[SpotFleetRequestLaunchSpecificationArgs]] = None,
        launch_template_configs: Optional[Sequence[SpotFleetRequestLaunchTemplateConfigArgs]] = None,
        load_balancers: Optional[Sequence[str]] = None,
        on_demand_allocation_strategy: Optional[str] = None,
        on_demand_max_total_price: Optional[str] = None,
        on_demand_target_capacity: Optional[int] = None,
        replace_unhealthy_instances: Optional[bool] = None,
        spot_maintenance_strategies: Optional[SpotFleetRequestSpotMaintenanceStrategiesArgs] = None,
        spot_price: Optional[str] = None,
        spot_request_state: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        target_capacity: Optional[int] = None,
        target_capacity_unit_type: Optional[str] = None,
        target_group_arns: Optional[Sequence[str]] = None,
        terminate_instances_on_delete: Optional[str] = None,
        terminate_instances_with_expiration: Optional[bool] = None,
        valid_from: Optional[str] = None,
        valid_until: Optional[str] = None,
        wait_for_fulfillment: Optional[bool] = None) -> SpotFleetRequest
func GetSpotFleetRequest(ctx *Context, name string, id IDInput, state *SpotFleetRequestState, opts ...ResourceOption) (*SpotFleetRequest, error)
public static SpotFleetRequest Get(string name, Input<string> id, SpotFleetRequestState? state, CustomResourceOptions? opts = null)
public static SpotFleetRequest get(String name, Output<String> id, SpotFleetRequestState state, CustomResourceOptions options)
resources:  _:    type: aws:ec2:SpotFleetRequest    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
ClientToken string
Context Changes to this property will trigger replacement. string
Reserved.
ExcessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
FleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
IamFleetRole Changes to this property will trigger replacement. string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
InstanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
InstancePoolsToUseCount Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
LaunchSpecifications Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecification>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

LaunchTemplateConfigs Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfig>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
LoadBalancers Changes to this property will trigger replacement. List<string>
A list of elastic load balancer names to add to the Spot fleet.
OnDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
OnDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
OnDemandTargetCapacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
ReplaceUnhealthyInstances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
SpotRequestState string
The state of the Spot fleet request.
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 default_tags configuration block.

Deprecated: Please use tags instead.

TargetCapacity int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
TargetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
TargetGroupArns Changes to this property will trigger replacement. List<string>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
TerminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
TerminateInstancesWithExpiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
ValidFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
WaitForFulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
AllocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
ClientToken string
Context Changes to this property will trigger replacement. string
Reserved.
ExcessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
FleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
IamFleetRole Changes to this property will trigger replacement. string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
InstanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
InstancePoolsToUseCount Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
LaunchSpecifications Changes to this property will trigger replacement. []SpotFleetRequestLaunchSpecificationArgs

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

LaunchTemplateConfigs Changes to this property will trigger replacement. []SpotFleetRequestLaunchTemplateConfigArgs
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
LoadBalancers Changes to this property will trigger replacement. []string
A list of elastic load balancer names to add to the Spot fleet.
OnDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
OnDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
OnDemandTargetCapacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
ReplaceUnhealthyInstances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
SpotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategiesArgs
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
SpotRequestState string
The state of the Spot fleet request.
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 default_tags configuration block.

Deprecated: Please use tags instead.

TargetCapacity int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
TargetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
TargetGroupArns Changes to this property will trigger replacement. []string
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
TerminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
TerminateInstancesWithExpiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
ValidFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
ValidUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
WaitForFulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
allocationStrategy Changes to this property will trigger replacement. String
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
clientToken String
context Changes to this property will trigger replacement. String
Reserved.
excessCapacityTerminationPolicy String
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. String
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
iamFleetRole Changes to this property will trigger replacement. String
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instanceInterruptionBehaviour Changes to this property will trigger replacement. String
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. Integer
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecification>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfig>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. List<String>
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. String
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. String
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity Integer
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. Boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
spotRequestState String
The state of the Spot fleet request.
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 default_tags configuration block.

Deprecated: Please use tags instead.

targetCapacity Integer
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
targetCapacityUnitType Changes to this property will trigger replacement. String
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. List<String>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete String
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. Boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. String
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. String
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment Boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
allocationStrategy Changes to this property will trigger replacement. string
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
clientToken string
context Changes to this property will trigger replacement. string
Reserved.
excessCapacityTerminationPolicy string
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. string
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
iamFleetRole Changes to this property will trigger replacement. string
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instanceInterruptionBehaviour Changes to this property will trigger replacement. string
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. number
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. SpotFleetRequestLaunchSpecification[]

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfig[]
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. string[]
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. string
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. string
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity number
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies SpotFleetRequestSpotMaintenanceStrategies
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
spotRequestState string
The state of the Spot fleet request.
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 default_tags configuration block.

Deprecated: Please use tags instead.

targetCapacity number
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
targetCapacityUnitType Changes to this property will trigger replacement. string
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. string[]
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete string
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. string
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. string
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
allocation_strategy Changes to this property will trigger replacement. str
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
client_token str
context Changes to this property will trigger replacement. str
Reserved.
excess_capacity_termination_policy str
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleet_type Changes to this property will trigger replacement. str
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
iam_fleet_role Changes to this property will trigger replacement. str
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instance_interruption_behaviour Changes to this property will trigger replacement. str
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instance_pools_to_use_count Changes to this property will trigger replacement. int
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launch_specifications Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchSpecificationArgs]

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launch_template_configs Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchTemplateConfigArgs]
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
load_balancers Changes to this property will trigger replacement. Sequence[str]
A list of elastic load balancer names to add to the Spot fleet.
on_demand_allocation_strategy Changes to this property will trigger replacement. str
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
on_demand_max_total_price Changes to this property will trigger replacement. str
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
on_demand_target_capacity int
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replace_unhealthy_instances Changes to this property will trigger replacement. bool
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spot_maintenance_strategies SpotFleetRequestSpotMaintenanceStrategiesArgs
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spot_price Changes to this property will trigger replacement. str
The maximum bid price per unit hour.
spot_request_state str
The state of the Spot fleet request.
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 default_tags configuration block.

Deprecated: Please use tags instead.

target_capacity int
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
target_capacity_unit_type Changes to this property will trigger replacement. str
The unit for the target capacity. This can only be done with instance_requirements defined
target_group_arns Changes to this property will trigger replacement. Sequence[str]
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminate_instances_on_delete str
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminate_instances_with_expiration Changes to this property will trigger replacement. bool
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
valid_from Changes to this property will trigger replacement. str
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
valid_until Changes to this property will trigger replacement. str
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
wait_for_fulfillment bool
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.
allocationStrategy Changes to this property will trigger replacement. String
Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. Valid values: lowestPrice, diversified, capacityOptimized, capacityOptimizedPrioritized, and priceCapacityOptimized. The default is lowestPrice.
clientToken String
context Changes to this property will trigger replacement. String
Reserved.
excessCapacityTerminationPolicy String
Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.
fleetType Changes to this property will trigger replacement. String
The type of fleet request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. Default is maintain.
iamFleetRole Changes to this property will trigger replacement. String
Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration.
instanceInterruptionBehaviour Changes to this property will trigger replacement. String
Indicates whether a Spot instance stops or terminates when it is interrupted. Default is terminate.
instancePoolsToUseCount Changes to this property will trigger replacement. Number
The number of Spot pools across which to allocate your target Spot capacity. Valid only when allocation_strategy is set to lowestPrice. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
launchSpecifications Changes to this property will trigger replacement. List<Property Map>

Used to define the launch configuration of the spot-fleet request. Can be specified multiple times to define different bids across different markets and instance types. Conflicts with launch_template_config. At least one of launch_specification or launch_template_config is required.

Note: This takes in similar but not identical inputs as aws.ec2.Instance. There are limitations on what you can specify. See the list of officially supported inputs in the reference documentation. Any normal aws.ec2.Instance parameter that corresponds to those inputs may be used and it have a additional parameter iam_instance_profile_arn takes aws.iam.InstanceProfile attribute arn as input.

launchTemplateConfigs Changes to this property will trigger replacement. List<Property Map>
Launch template configuration block. See Launch Template Configs below for more details. Conflicts with launch_specification. At least one of launch_specification or launch_template_config is required.
loadBalancers Changes to this property will trigger replacement. List<String>
A list of elastic load balancer names to add to the Spot fleet.
onDemandAllocationStrategy Changes to this property will trigger replacement. String
The order of the launch template overrides to use in fulfilling On-Demand capacity. the possible values are: lowestPrice and prioritized. the default is lowestPrice.
onDemandMaxTotalPrice Changes to this property will trigger replacement. String
The maximum amount per hour for On-Demand Instances that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
onDemandTargetCapacity Number
The number of On-Demand units to request. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.
replaceUnhealthyInstances Changes to this property will trigger replacement. Boolean
Indicates whether Spot fleet should replace unhealthy instances. Default false.
spotMaintenanceStrategies Property Map
Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
spotRequestState String
The state of the Spot fleet request.
tags Map<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>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetCapacity Number
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.
targetCapacityUnitType Changes to this property will trigger replacement. String
The unit for the target capacity. This can only be done with instance_requirements defined
targetGroupArns Changes to this property will trigger replacement. List<String>
A list of aws.alb.TargetGroup ARNs, for use with Application Load Balancing.
terminateInstancesOnDelete String
Indicates whether running Spot instances should be terminated when the resource is deleted (and the Spot fleet request cancelled). If no value is specified, the value of the terminate_instances_with_expiration argument is used.
terminateInstancesWithExpiration Changes to this property will trigger replacement. Boolean
Indicates whether running Spot instances should be terminated when the Spot fleet request expires.
validFrom Changes to this property will trigger replacement. String
The start date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
validUntil Changes to this property will trigger replacement. String
The end date and time of the request, in UTC RFC3339 format(for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot instance requests are placed or enabled to fulfill the request.
waitForFulfillment Boolean
If set, this provider will wait for the Spot Request to be fulfilled, and will throw an error if the timeout of 10m is reached.

Supporting Types

SpotFleetRequestLaunchSpecification
, SpotFleetRequestLaunchSpecificationArgs

Ami
This property is required.
Changes to this property will trigger replacement.
string
InstanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of instance to request.
AssociatePublicIpAddress bool
AvailabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
EbsBlockDevices List<SpotFleetRequestLaunchSpecificationEbsBlockDevice>
EbsOptimized bool
EphemeralBlockDevices Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecificationEphemeralBlockDevice>
IamInstanceProfile Changes to this property will trigger replacement. string
IamInstanceProfileArn Changes to this property will trigger replacement. string
KeyName Changes to this property will trigger replacement. string
Monitoring bool
PlacementGroup Changes to this property will trigger replacement. string
PlacementTenancy Changes to this property will trigger replacement. string
RootBlockDevices List<SpotFleetRequestLaunchSpecificationRootBlockDevice>
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
SubnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
Tags Changes to this property will trigger replacement. 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.
UserData Changes to this property will trigger replacement. string
VpcSecurityGroupIds List<string>
WeightedCapacity Changes to this property will trigger replacement. string
The capacity added to the fleet by a fulfilled request.
Ami
This property is required.
Changes to this property will trigger replacement.
string
InstanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of instance to request.
AssociatePublicIpAddress bool
AvailabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
EbsBlockDevices []SpotFleetRequestLaunchSpecificationEbsBlockDevice
EbsOptimized bool
EphemeralBlockDevices Changes to this property will trigger replacement. []SpotFleetRequestLaunchSpecificationEphemeralBlockDevice
IamInstanceProfile Changes to this property will trigger replacement. string
IamInstanceProfileArn Changes to this property will trigger replacement. string
KeyName Changes to this property will trigger replacement. string
Monitoring bool
PlacementGroup Changes to this property will trigger replacement. string
PlacementTenancy Changes to this property will trigger replacement. string
RootBlockDevices []SpotFleetRequestLaunchSpecificationRootBlockDevice
SpotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
SubnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
Tags Changes to this property will trigger replacement. 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.
UserData Changes to this property will trigger replacement. string
VpcSecurityGroupIds []string
WeightedCapacity Changes to this property will trigger replacement. string
The capacity added to the fleet by a fulfilled request.
ami
This property is required.
Changes to this property will trigger replacement.
String
instanceType
This property is required.
Changes to this property will trigger replacement.
String
The type of instance to request.
associatePublicIpAddress Boolean
availabilityZone Changes to this property will trigger replacement. String
The availability zone in which to place the request.
ebsBlockDevices List<SpotFleetRequestLaunchSpecificationEbsBlockDevice>
ebsOptimized Boolean
ephemeralBlockDevices Changes to this property will trigger replacement. List<SpotFleetRequestLaunchSpecificationEphemeralBlockDevice>
iamInstanceProfile Changes to this property will trigger replacement. String
iamInstanceProfileArn Changes to this property will trigger replacement. String
keyName Changes to this property will trigger replacement. String
monitoring Boolean
placementGroup Changes to this property will trigger replacement. String
placementTenancy Changes to this property will trigger replacement. String
rootBlockDevices List<SpotFleetRequestLaunchSpecificationRootBlockDevice>
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
subnetId Changes to this property will trigger replacement. String
The subnet in which to launch the requested instance.
tags Changes to this property will trigger replacement. 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.
userData Changes to this property will trigger replacement. String
vpcSecurityGroupIds List<String>
weightedCapacity Changes to this property will trigger replacement. String
The capacity added to the fleet by a fulfilled request.
ami
This property is required.
Changes to this property will trigger replacement.
string
instanceType
This property is required.
Changes to this property will trigger replacement.
string
The type of instance to request.
associatePublicIpAddress boolean
availabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
ebsBlockDevices SpotFleetRequestLaunchSpecificationEbsBlockDevice[]
ebsOptimized boolean
ephemeralBlockDevices Changes to this property will trigger replacement. SpotFleetRequestLaunchSpecificationEphemeralBlockDevice[]
iamInstanceProfile Changes to this property will trigger replacement. string
iamInstanceProfileArn Changes to this property will trigger replacement. string
keyName Changes to this property will trigger replacement. string
monitoring boolean
placementGroup Changes to this property will trigger replacement. string
placementTenancy Changes to this property will trigger replacement. string
rootBlockDevices SpotFleetRequestLaunchSpecificationRootBlockDevice[]
spotPrice Changes to this property will trigger replacement. string
The maximum bid price per unit hour.
subnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
tags Changes to this property will trigger replacement. {[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.
userData Changes to this property will trigger replacement. string
vpcSecurityGroupIds string[]
weightedCapacity Changes to this property will trigger replacement. string
The capacity added to the fleet by a fulfilled request.
ami
This property is required.
Changes to this property will trigger replacement.
str
instance_type
This property is required.
Changes to this property will trigger replacement.
str
The type of instance to request.
associate_public_ip_address bool
availability_zone Changes to this property will trigger replacement. str
The availability zone in which to place the request.
ebs_block_devices Sequence[SpotFleetRequestLaunchSpecificationEbsBlockDevice]
ebs_optimized bool
ephemeral_block_devices Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchSpecificationEphemeralBlockDevice]
iam_instance_profile Changes to this property will trigger replacement. str
iam_instance_profile_arn Changes to this property will trigger replacement. str
key_name Changes to this property will trigger replacement. str
monitoring bool
placement_group Changes to this property will trigger replacement. str
placement_tenancy Changes to this property will trigger replacement. str
root_block_devices Sequence[SpotFleetRequestLaunchSpecificationRootBlockDevice]
spot_price Changes to this property will trigger replacement. str
The maximum bid price per unit hour.
subnet_id Changes to this property will trigger replacement. str
The subnet in which to launch the requested instance.
tags Changes to this property will trigger replacement. 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.
user_data Changes to this property will trigger replacement. str
vpc_security_group_ids Sequence[str]
weighted_capacity Changes to this property will trigger replacement. str
The capacity added to the fleet by a fulfilled request.
ami
This property is required.
Changes to this property will trigger replacement.
String
instanceType
This property is required.
Changes to this property will trigger replacement.
String
The type of instance to request.
associatePublicIpAddress Boolean
availabilityZone Changes to this property will trigger replacement. String
The availability zone in which to place the request.
ebsBlockDevices List<Property Map>
ebsOptimized Boolean
ephemeralBlockDevices Changes to this property will trigger replacement. List<Property Map>
iamInstanceProfile Changes to this property will trigger replacement. String
iamInstanceProfileArn Changes to this property will trigger replacement. String
keyName Changes to this property will trigger replacement. String
monitoring Boolean
placementGroup Changes to this property will trigger replacement. String
placementTenancy Changes to this property will trigger replacement. String
rootBlockDevices List<Property Map>
spotPrice Changes to this property will trigger replacement. String
The maximum bid price per unit hour.
subnetId Changes to this property will trigger replacement. String
The subnet in which to launch the requested instance.
tags Changes to this property will trigger replacement. Map<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.
userData Changes to this property will trigger replacement. String
vpcSecurityGroupIds List<String>
weightedCapacity Changes to this property will trigger replacement. String
The capacity added to the fleet by a fulfilled request.

SpotFleetRequestLaunchSpecificationEbsBlockDevice
, SpotFleetRequestLaunchSpecificationEbsBlockDeviceArgs

DeviceName
This property is required.
Changes to this property will trigger replacement.
string
DeleteOnTermination Changes to this property will trigger replacement. bool
Encrypted Changes to this property will trigger replacement. bool
Iops Changes to this property will trigger replacement. int
KmsKeyId Changes to this property will trigger replacement. string
SnapshotId Changes to this property will trigger replacement. string
Throughput Changes to this property will trigger replacement. int
VolumeSize Changes to this property will trigger replacement. int
VolumeType Changes to this property will trigger replacement. string
DeviceName
This property is required.
Changes to this property will trigger replacement.
string
DeleteOnTermination Changes to this property will trigger replacement. bool
Encrypted Changes to this property will trigger replacement. bool
Iops Changes to this property will trigger replacement. int
KmsKeyId Changes to this property will trigger replacement. string
SnapshotId Changes to this property will trigger replacement. string
Throughput Changes to this property will trigger replacement. int
VolumeSize Changes to this property will trigger replacement. int
VolumeType Changes to this property will trigger replacement. string
deviceName
This property is required.
Changes to this property will trigger replacement.
String
deleteOnTermination Changes to this property will trigger replacement. Boolean
encrypted Changes to this property will trigger replacement. Boolean
iops Changes to this property will trigger replacement. Integer
kmsKeyId Changes to this property will trigger replacement. String
snapshotId Changes to this property will trigger replacement. String
throughput Changes to this property will trigger replacement. Integer
volumeSize Changes to this property will trigger replacement. Integer
volumeType Changes to this property will trigger replacement. String
deviceName
This property is required.
Changes to this property will trigger replacement.
string
deleteOnTermination Changes to this property will trigger replacement. boolean
encrypted Changes to this property will trigger replacement. boolean
iops Changes to this property will trigger replacement. number
kmsKeyId Changes to this property will trigger replacement. string
snapshotId Changes to this property will trigger replacement. string
throughput Changes to this property will trigger replacement. number
volumeSize Changes to this property will trigger replacement. number
volumeType Changes to this property will trigger replacement. string
device_name
This property is required.
Changes to this property will trigger replacement.
str
delete_on_termination Changes to this property will trigger replacement. bool
encrypted Changes to this property will trigger replacement. bool
iops Changes to this property will trigger replacement. int
kms_key_id Changes to this property will trigger replacement. str
snapshot_id Changes to this property will trigger replacement. str
throughput Changes to this property will trigger replacement. int
volume_size Changes to this property will trigger replacement. int
volume_type Changes to this property will trigger replacement. str
deviceName
This property is required.
Changes to this property will trigger replacement.
String
deleteOnTermination Changes to this property will trigger replacement. Boolean
encrypted Changes to this property will trigger replacement. Boolean
iops Changes to this property will trigger replacement. Number
kmsKeyId Changes to this property will trigger replacement. String
snapshotId Changes to this property will trigger replacement. String
throughput Changes to this property will trigger replacement. Number
volumeSize Changes to this property will trigger replacement. Number
volumeType Changes to this property will trigger replacement. String

SpotFleetRequestLaunchSpecificationEphemeralBlockDevice
, SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceArgs

DeviceName This property is required. string
VirtualName This property is required. string
DeviceName This property is required. string
VirtualName This property is required. string
deviceName This property is required. String
virtualName This property is required. String
deviceName This property is required. string
virtualName This property is required. string
device_name This property is required. str
virtual_name This property is required. str
deviceName This property is required. String
virtualName This property is required. String

SpotFleetRequestLaunchSpecificationRootBlockDevice
, SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs

DeleteOnTermination Changes to this property will trigger replacement. bool
Encrypted Changes to this property will trigger replacement. bool
Iops Changes to this property will trigger replacement. int
KmsKeyId Changes to this property will trigger replacement. string
Throughput Changes to this property will trigger replacement. int
VolumeSize Changes to this property will trigger replacement. int
VolumeType Changes to this property will trigger replacement. string
DeleteOnTermination Changes to this property will trigger replacement. bool
Encrypted Changes to this property will trigger replacement. bool
Iops Changes to this property will trigger replacement. int
KmsKeyId Changes to this property will trigger replacement. string
Throughput Changes to this property will trigger replacement. int
VolumeSize Changes to this property will trigger replacement. int
VolumeType Changes to this property will trigger replacement. string
deleteOnTermination Changes to this property will trigger replacement. Boolean
encrypted Changes to this property will trigger replacement. Boolean
iops Changes to this property will trigger replacement. Integer
kmsKeyId Changes to this property will trigger replacement. String
throughput Changes to this property will trigger replacement. Integer
volumeSize Changes to this property will trigger replacement. Integer
volumeType Changes to this property will trigger replacement. String
deleteOnTermination Changes to this property will trigger replacement. boolean
encrypted Changes to this property will trigger replacement. boolean
iops Changes to this property will trigger replacement. number
kmsKeyId Changes to this property will trigger replacement. string
throughput Changes to this property will trigger replacement. number
volumeSize Changes to this property will trigger replacement. number
volumeType Changes to this property will trigger replacement. string
delete_on_termination Changes to this property will trigger replacement. bool
encrypted Changes to this property will trigger replacement. bool
iops Changes to this property will trigger replacement. int
kms_key_id Changes to this property will trigger replacement. str
throughput Changes to this property will trigger replacement. int
volume_size Changes to this property will trigger replacement. int
volume_type Changes to this property will trigger replacement. str
deleteOnTermination Changes to this property will trigger replacement. Boolean
encrypted Changes to this property will trigger replacement. Boolean
iops Changes to this property will trigger replacement. Number
kmsKeyId Changes to this property will trigger replacement. String
throughput Changes to this property will trigger replacement. Number
volumeSize Changes to this property will trigger replacement. Number
volumeType Changes to this property will trigger replacement. String

SpotFleetRequestLaunchTemplateConfig
, SpotFleetRequestLaunchTemplateConfigArgs

LaunchTemplateSpecification This property is required. SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
Launch template specification. See Launch Template Specification below for more details.
Overrides Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfigOverride>
One or more override configurations. See Overrides below for more details.
LaunchTemplateSpecification This property is required. SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
Launch template specification. See Launch Template Specification below for more details.
Overrides Changes to this property will trigger replacement. []SpotFleetRequestLaunchTemplateConfigOverride
One or more override configurations. See Overrides below for more details.
launchTemplateSpecification This property is required. SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
Launch template specification. See Launch Template Specification below for more details.
overrides Changes to this property will trigger replacement. List<SpotFleetRequestLaunchTemplateConfigOverride>
One or more override configurations. See Overrides below for more details.
launchTemplateSpecification This property is required. SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
Launch template specification. See Launch Template Specification below for more details.
overrides Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverride[]
One or more override configurations. See Overrides below for more details.
launch_template_specification This property is required. SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
Launch template specification. See Launch Template Specification below for more details.
overrides Changes to this property will trigger replacement. Sequence[SpotFleetRequestLaunchTemplateConfigOverride]
One or more override configurations. See Overrides below for more details.
launchTemplateSpecification This property is required. Property Map
Launch template specification. See Launch Template Specification below for more details.
overrides Changes to this property will trigger replacement. List<Property Map>
One or more override configurations. See Overrides below for more details.

SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecification
, SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs

Id Changes to this property will trigger replacement. string
The ID of the launch template. Conflicts with name.
Name Changes to this property will trigger replacement. string
The name of the launch template. Conflicts with id.
Version Changes to this property will trigger replacement. string

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

Id Changes to this property will trigger replacement. string
The ID of the launch template. Conflicts with name.
Name Changes to this property will trigger replacement. string
The name of the launch template. Conflicts with id.
Version Changes to this property will trigger replacement. string

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

id Changes to this property will trigger replacement. String
The ID of the launch template. Conflicts with name.
name Changes to this property will trigger replacement. String
The name of the launch template. Conflicts with id.
version Changes to this property will trigger replacement. String

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

id Changes to this property will trigger replacement. string
The ID of the launch template. Conflicts with name.
name Changes to this property will trigger replacement. string
The name of the launch template. Conflicts with id.
version Changes to this property will trigger replacement. string

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

id Changes to this property will trigger replacement. str
The ID of the launch template. Conflicts with name.
name Changes to this property will trigger replacement. str
The name of the launch template. Conflicts with id.
version Changes to this property will trigger replacement. str

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

id Changes to this property will trigger replacement. String
The ID of the launch template. Conflicts with name.
name Changes to this property will trigger replacement. String
The name of the launch template. Conflicts with id.
version Changes to this property will trigger replacement. String

Template version. Unlike the autoscaling equivalent, does not support $Latest or $Default, so use the launch_template resource's attribute, e.g., "${aws_launch_template.foo.latest_version}". It will use the default version if omitted.

Note: The specified launch template can specify only a subset of the inputs of aws.ec2.LaunchTemplate. There are limitations on what you can specify as spot fleet does not support all the attributes that are supported by autoscaling groups. AWS documentation is currently sparse, but at least instance_initiated_shutdown_behavior is confirmed unsupported.

SpotFleetRequestLaunchTemplateConfigOverride
, SpotFleetRequestLaunchTemplateConfigOverrideArgs

AvailabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
InstanceRequirements Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
The instance requirements. See below.
InstanceType Changes to this property will trigger replacement. string
The type of instance to request.
Priority Changes to this property will trigger replacement. double
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
SpotPrice Changes to this property will trigger replacement. string
The maximum spot bid for this override request.
SubnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
WeightedCapacity Changes to this property will trigger replacement. double
The capacity added to the fleet by a fulfilled request.
AvailabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
InstanceRequirements Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
The instance requirements. See below.
InstanceType Changes to this property will trigger replacement. string
The type of instance to request.
Priority Changes to this property will trigger replacement. float64
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
SpotPrice Changes to this property will trigger replacement. string
The maximum spot bid for this override request.
SubnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
WeightedCapacity Changes to this property will trigger replacement. float64
The capacity added to the fleet by a fulfilled request.
availabilityZone Changes to this property will trigger replacement. String
The availability zone in which to place the request.
instanceRequirements Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
The instance requirements. See below.
instanceType Changes to this property will trigger replacement. String
The type of instance to request.
priority Changes to this property will trigger replacement. Double
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
spotPrice Changes to this property will trigger replacement. String
The maximum spot bid for this override request.
subnetId Changes to this property will trigger replacement. String
The subnet in which to launch the requested instance.
weightedCapacity Changes to this property will trigger replacement. Double
The capacity added to the fleet by a fulfilled request.
availabilityZone Changes to this property will trigger replacement. string
The availability zone in which to place the request.
instanceRequirements Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
The instance requirements. See below.
instanceType Changes to this property will trigger replacement. string
The type of instance to request.
priority Changes to this property will trigger replacement. number
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
spotPrice Changes to this property will trigger replacement. string
The maximum spot bid for this override request.
subnetId Changes to this property will trigger replacement. string
The subnet in which to launch the requested instance.
weightedCapacity Changes to this property will trigger replacement. number
The capacity added to the fleet by a fulfilled request.
availability_zone Changes to this property will trigger replacement. str
The availability zone in which to place the request.
instance_requirements Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
The instance requirements. See below.
instance_type Changes to this property will trigger replacement. str
The type of instance to request.
priority Changes to this property will trigger replacement. float
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
spot_price Changes to this property will trigger replacement. str
The maximum spot bid for this override request.
subnet_id Changes to this property will trigger replacement. str
The subnet in which to launch the requested instance.
weighted_capacity Changes to this property will trigger replacement. float
The capacity added to the fleet by a fulfilled request.
availabilityZone Changes to this property will trigger replacement. String
The availability zone in which to place the request.
instanceRequirements Changes to this property will trigger replacement. Property Map
The instance requirements. See below.
instanceType Changes to this property will trigger replacement. String
The type of instance to request.
priority Changes to this property will trigger replacement. Number
The priority for the launch template override. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority.
spotPrice Changes to this property will trigger replacement. String
The maximum spot bid for this override request.
subnetId Changes to this property will trigger replacement. String
The subnet in which to launch the requested instance.
weightedCapacity Changes to this property will trigger replacement. Number
The capacity added to the fleet by a fulfilled request.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirements
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsArgs

AcceleratorCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
AcceleratorManufacturers Changes to this property will trigger replacement. List<string>
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
AcceleratorNames Changes to this property will trigger replacement. List<string>
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
AcceleratorTotalMemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
AcceleratorTypes Changes to this property will trigger replacement. List<string>
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
AllowedInstanceTypes Changes to this property will trigger replacement. List<string>

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

BareMetal Changes to this property will trigger replacement. string
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
BaselineEbsBandwidthMbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
BurstablePerformance Changes to this property will trigger replacement. string
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
CpuManufacturers Changes to this property will trigger replacement. List<string>

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
ExcludedInstanceTypes Changes to this property will trigger replacement. List<string>

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

InstanceGenerations Changes to this property will trigger replacement. List<string>
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
LocalStorage Changes to this property will trigger replacement. string
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
LocalStorageTypes Changes to this property will trigger replacement. List<string>
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
MemoryGibPerVcpu Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
MemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
NetworkBandwidthGbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
NetworkInterfaceCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
OnDemandMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. int

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

RequireHibernateSupport Changes to this property will trigger replacement. bool
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
SpotMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. int

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

TotalLocalStorageGb Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
VcpuCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
Block describing the minimum and maximum number of vCPUs. Default is no maximum.
AcceleratorCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
AcceleratorManufacturers Changes to this property will trigger replacement. []string
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
AcceleratorNames Changes to this property will trigger replacement. []string
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
AcceleratorTotalMemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
AcceleratorTypes Changes to this property will trigger replacement. []string
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
AllowedInstanceTypes Changes to this property will trigger replacement. []string

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

BareMetal Changes to this property will trigger replacement. string
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
BaselineEbsBandwidthMbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
BurstablePerformance Changes to this property will trigger replacement. string
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
CpuManufacturers Changes to this property will trigger replacement. []string

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
ExcludedInstanceTypes Changes to this property will trigger replacement. []string

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

InstanceGenerations Changes to this property will trigger replacement. []string
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
LocalStorage Changes to this property will trigger replacement. string
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
LocalStorageTypes Changes to this property will trigger replacement. []string
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
MemoryGibPerVcpu Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
MemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
NetworkBandwidthGbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
NetworkInterfaceCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
OnDemandMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. int

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

RequireHibernateSupport Changes to this property will trigger replacement. bool
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
SpotMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. int

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

TotalLocalStorageGb Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
VcpuCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
Block describing the minimum and maximum number of vCPUs. Default is no maximum.
acceleratorCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
acceleratorManufacturers Changes to this property will trigger replacement. List<String>
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
acceleratorNames Changes to this property will trigger replacement. List<String>
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
acceleratorTotalMemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
acceleratorTypes Changes to this property will trigger replacement. List<String>
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
allowedInstanceTypes Changes to this property will trigger replacement. List<String>

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

bareMetal Changes to this property will trigger replacement. String
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
baselineEbsBandwidthMbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
burstablePerformance Changes to this property will trigger replacement. String
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
cpuManufacturers Changes to this property will trigger replacement. List<String>

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
excludedInstanceTypes Changes to this property will trigger replacement. List<String>

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

instanceGenerations Changes to this property will trigger replacement. List<String>
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
localStorage Changes to this property will trigger replacement. String
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
localStorageTypes Changes to this property will trigger replacement. List<String>
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
memoryGibPerVcpu Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
memoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
networkBandwidthGbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
networkInterfaceCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
onDemandMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. Integer

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

requireHibernateSupport Changes to this property will trigger replacement. Boolean
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
spotMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. Integer

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

totalLocalStorageGb Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
vcpuCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
Block describing the minimum and maximum number of vCPUs. Default is no maximum.
acceleratorCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
acceleratorManufacturers Changes to this property will trigger replacement. string[]
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
acceleratorNames Changes to this property will trigger replacement. string[]
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
acceleratorTotalMemoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
acceleratorTypes Changes to this property will trigger replacement. string[]
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
allowedInstanceTypes Changes to this property will trigger replacement. string[]

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

bareMetal Changes to this property will trigger replacement. string
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
baselineEbsBandwidthMbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
burstablePerformance Changes to this property will trigger replacement. string
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
cpuManufacturers Changes to this property will trigger replacement. string[]

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
excludedInstanceTypes Changes to this property will trigger replacement. string[]

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

instanceGenerations Changes to this property will trigger replacement. string[]
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
localStorage Changes to this property will trigger replacement. string
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
localStorageTypes Changes to this property will trigger replacement. string[]
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
memoryGibPerVcpu Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
memoryMib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
networkBandwidthGbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
networkInterfaceCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
onDemandMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. number

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

requireHibernateSupport Changes to this property will trigger replacement. boolean
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
spotMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. number

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

totalLocalStorageGb Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
vcpuCount Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
Block describing the minimum and maximum number of vCPUs. Default is no maximum.
accelerator_count Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
accelerator_manufacturers Changes to this property will trigger replacement. Sequence[str]
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
accelerator_names Changes to this property will trigger replacement. Sequence[str]
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
accelerator_total_memory_mib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
accelerator_types Changes to this property will trigger replacement. Sequence[str]
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
allowed_instance_types Changes to this property will trigger replacement. Sequence[str]

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

bare_metal Changes to this property will trigger replacement. str
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
baseline_ebs_bandwidth_mbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
burstable_performance Changes to this property will trigger replacement. str
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
cpu_manufacturers Changes to this property will trigger replacement. Sequence[str]

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
excluded_instance_types Changes to this property will trigger replacement. Sequence[str]

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

instance_generations Changes to this property will trigger replacement. Sequence[str]
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
local_storage Changes to this property will trigger replacement. str
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
local_storage_types Changes to this property will trigger replacement. Sequence[str]
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
memory_gib_per_vcpu Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
memory_mib Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
network_bandwidth_gbps Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
network_interface_count Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
on_demand_max_price_percentage_over_lowest_price Changes to this property will trigger replacement. int

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

require_hibernate_support Changes to this property will trigger replacement. bool
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
spot_max_price_percentage_over_lowest_price Changes to this property will trigger replacement. int

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

total_local_storage_gb Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
vcpu_count Changes to this property will trigger replacement. SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
Block describing the minimum and maximum number of vCPUs. Default is no maximum.
acceleratorCount Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
acceleratorManufacturers Changes to this property will trigger replacement. List<String>
List of accelerator manufacturer names. Default is any manufacturer.

Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
acceleratorNames Changes to this property will trigger replacement. List<String>
List of accelerator names. Default is any acclerator.

Valid names:
* a100            - NVIDIA A100 GPUs
* v100            - NVIDIA V100 GPUs
* k80             - NVIDIA K80 GPUs
* t4              - NVIDIA T4 GPUs
* m60             - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p            - Xilinx VU9P FPGAs
acceleratorTotalMemoryMib Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
acceleratorTypes Changes to this property will trigger replacement. List<String>
List of accelerator types. Default is any accelerator type.

Valid types:
* fpga
* gpu
* inference
allowedInstanceTypes Changes to this property will trigger replacement. List<String>

List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.

NOTE: If you specify allowed_instance_types, you can't specify excluded_instance_types.

bareMetal Changes to this property will trigger replacement. String
Indicate whether bare metal instace types should be included, excluded, or required. Default is excluded.
baselineEbsBandwidthMbps Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
burstablePerformance Changes to this property will trigger replacement. String
Indicate whether burstable performance instance types should be included, excluded, or required. Default is excluded.
cpuManufacturers Changes to this property will trigger replacement. List<String>

List of CPU manufacturer names. Default is any manufacturer.

NOTE: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Valid names:
* amazon-web-services
* amd
* intel
excludedInstanceTypes Changes to this property will trigger replacement. List<String>

List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge, c5*.*, m5a.*, r*, *3*. For example, if you specify c5*, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.*, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.

NOTE: If you specify excluded_instance_types, you can't specify allowed_instance_types.

instanceGenerations Changes to this property will trigger replacement. List<String>
List of instance generation names. Default is any generation.

Valid names:
* current  - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
localStorage Changes to this property will trigger replacement. String
Indicate whether instance types with local storage volumes are included, excluded, or required. Default is included.
localStorageTypes Changes to this property will trigger replacement. List<String>
List of local storage type names. Default any storage type.

Value names:
* hdd - hard disk drive
* ssd - solid state drive
memoryGibPerVcpu Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
memoryMib Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
networkBandwidthGbps Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
networkInterfaceCount Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
onDemandMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. Number

The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

requireHibernateSupport Changes to this property will trigger replacement. Boolean
Indicate whether instance types must support On-Demand Instance Hibernation, either true or false. Default is false.
spotMaxPricePercentageOverLowestPrice Changes to this property will trigger replacement. Number

The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.

If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

totalLocalStorageGb Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
vcpuCount Changes to this property will trigger replacement. Property Map
Block describing the minimum and maximum number of vCPUs. Default is no maximum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCount
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorCountArgs

Max Changes to this property will trigger replacement. int
Maximum. Set to 0 to exclude instance types with accelerators.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum. Set to 0 to exclude instance types with accelerators.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum. Set to 0 to exclude instance types with accelerators.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum. Set to 0 to exclude instance types with accelerators.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum. Set to 0 to exclude instance types with accelerators.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum. Set to 0 to exclude instance types with accelerators.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMib
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsAcceleratorTotalMemoryMibArgs

Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbps
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsBaselineEbsBandwidthMbpsArgs

Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpu
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryGibPerVcpuArgs

Max Changes to this property will trigger replacement. double
Maximum. May be a decimal number, e.g. 0.5.
Min Changes to this property will trigger replacement. double
Minimum. May be a decimal number, e.g. 0.5.
Max Changes to this property will trigger replacement. float64
Maximum. May be a decimal number, e.g. 0.5.
Min Changes to this property will trigger replacement. float64
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. Double
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. Double
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. number
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. number
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. float
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. float
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. Number
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. Number
Minimum. May be a decimal number, e.g. 0.5.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMib
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsMemoryMibArgs

Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbps
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkBandwidthGbpsArgs

Max Changes to this property will trigger replacement. double
Maximum.
Min Changes to this property will trigger replacement. double
Minimum.
Max Changes to this property will trigger replacement. float64
Maximum.
Min Changes to this property will trigger replacement. float64
Minimum.
max Changes to this property will trigger replacement. Double
Maximum.
min Changes to this property will trigger replacement. Double
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. float
Maximum.
min Changes to this property will trigger replacement. float
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCount
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsNetworkInterfaceCountArgs

Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGb
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsTotalLocalStorageGbArgs

Max Changes to this property will trigger replacement. double
Maximum. May be a decimal number, e.g. 0.5.
Min Changes to this property will trigger replacement. double
Minimum. May be a decimal number, e.g. 0.5.
Max Changes to this property will trigger replacement. float64
Maximum. May be a decimal number, e.g. 0.5.
Min Changes to this property will trigger replacement. float64
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. Double
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. Double
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. number
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. number
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. float
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. float
Minimum. May be a decimal number, e.g. 0.5.
max Changes to this property will trigger replacement. Number
Maximum. May be a decimal number, e.g. 0.5.
min Changes to this property will trigger replacement. Number
Minimum. May be a decimal number, e.g. 0.5.

SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCount
, SpotFleetRequestLaunchTemplateConfigOverrideInstanceRequirementsVcpuCountArgs

Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
Max Changes to this property will trigger replacement. int
Maximum.
Min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Integer
Maximum.
min Changes to this property will trigger replacement. Integer
Minimum.
max Changes to this property will trigger replacement. number
Maximum.
min Changes to this property will trigger replacement. number
Minimum.
max Changes to this property will trigger replacement. int
Maximum.
min Changes to this property will trigger replacement. int
Minimum.
max Changes to this property will trigger replacement. Number
Maximum.
min Changes to this property will trigger replacement. Number
Minimum.

SpotFleetRequestSpotMaintenanceStrategies
, SpotFleetRequestSpotMaintenanceStrategiesArgs

CapacityRebalance SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
Nested argument containing the capacity rebalance for your fleet request. Defined below.
CapacityRebalance SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
Nested argument containing the capacity rebalance for your fleet request. Defined below.
capacityRebalance SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
Nested argument containing the capacity rebalance for your fleet request. Defined below.
capacityRebalance SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
Nested argument containing the capacity rebalance for your fleet request. Defined below.
capacity_rebalance SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
Nested argument containing the capacity rebalance for your fleet request. Defined below.
capacityRebalance Property Map
Nested argument containing the capacity rebalance for your fleet request. Defined below.

SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalance
, SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceArgs

ReplacementStrategy Changes to this property will trigger replacement. string
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.
ReplacementStrategy Changes to this property will trigger replacement. string
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.
replacementStrategy Changes to this property will trigger replacement. String
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.
replacementStrategy Changes to this property will trigger replacement. string
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.
replacement_strategy Changes to this property will trigger replacement. str
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.
replacementStrategy Changes to this property will trigger replacement. String
The replacement strategy to use. Only available for spot fleets with fleet_type set to maintain. Valid values: launch.

Import

Using pulumi import, import Spot Fleet Requests using id. For example:

$ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.