The Spot Fleet Management Tool (SFMT) is a user-friendly solution that simplifies Spot Fleet (JSON) configuration setup. SFMT is an easy-to-use platform that enables Deadline render farm admins who lack access to specialized deployment frameworks such as the Thinkbox Deadline RFDK (Render Farm Deployment Kit).

Below is an explanation of the different properties used to define a Spot Fleet configuration followed by a tutorial on how to use the Spot Fleet Management Tool.

Understanding Spot Fleet Configuration

    “fleet_1”: {
        “AllocationStrategy”: “capacityOptimized”,
        “IamFleetRole”: “arn:aws:iam::576872909007:role/aws-ec2-spot-fleet-tagging-role”,
        “LaunchSpecifications”: [],
        “LaunchTemplateConfigs”: [
                “LaunchTemplateSpecification”: {
                  “LaunchTemplateId”: “lt-xxxxxxxxxx”,
                  “Version”: “$Latest”
                “Overrides”: [
                    “InstanceType”: “c5.large”,
                    “SubnetId”: “subnet-xxxxxxx”
        “ReplaceUnhealthyInstances”: true,
        “TargetCapacity”: 1,
        “TerminateInstancesWithExpiration”: true,
        “Type”: “maintain”,
        “TagSpecifications”: [
                “ResourceType”: “spot-fleet-request”,
                “Tags”: [
                        “Value”: “0.42.0:SpotEventPluginFleet”,
                        “Key”: “aws-rfdk”
                        “Value”: “1.1.9”,
                        “Key”: “deployedByStudioBuilderVersion”

Definition of Terms

  • AllocationStrategy: Determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. In the example provided above, it is set to “capacityOptimized“. This means that the Spot Fleet identifies the pools with the highest available capacity for the number of instances that will be launched. 

Other available options for AllocationStrategy include:

  • lowestPrice: Selects the pools with the lowest price for the instances.
  • diversified: Spreads the instances across multiple pools to minimize the risk of interruptions.
  • capacityOptimized: As mentioned above, this option prioritizes pools with the highest available capacity.

Users can choose the AllocationStrategy that best fits their requirements based on factors such as price, risk tolerance, and capacity needs.

  • IamFleetRole: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances.
  • LaunchTemplateConfigs: Defines launch templates and their overrides for launching instances. If LaunchTemplateConfigs is specified, LaunchSpecifications cannot be used and vice versa.
  • ReplaceUnhealthyInstances: Indicates whether the Spot Fleet should replace unhealthy instances.
  • TargetCapacity: Defines the maximum number of instances that the Spot Fleet can launch.
  • TerminateInstancesWithExpiration: Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
  • Type: Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is set to  “request”, the Spot Fleet only places the required requests. Neither does it attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is set to “maintain”, the Spot Fleet maintains the target capacity.
  • TagSpecifications: The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request. The Spot Fleet request will fail if this value is not used. To tag instances at launch, specify the tags in the launch template (valid only for LaunchTemplateConfigs) or in the SpotFleetTagSpecification (valid only for LaunchSpecifications).

SFMT Tutorial – How to Use the Spot Fleet Management Tool

  1. The home page is divided into two sections. On the left, there is a form where users can make changes or additions to their Spot Fleet configurations. On the right, the JSON Preview area displays a real-time preview of the JSON configuration based on the user’s input.

Users can easily upload a JSON configuration file by clicking the highlighted “Upload” button indicated by an arrow in the screenshot. This action allows users to seamlessly edit, delete, or add Spot Fleets to their configuration.

image 8
  1. Once a Spot Fleet configuration JSON file is selected, the SFMT tool dynamically adjusts the form and JSON preview sections to reflect the uploaded configuration. A sample JSON file has been used for illustration purposes. The user will get notified if the uploaded JSON file format is wrong.

Once the JSON configuration is loaded, the form and JSON preview sections are populated with the details from the uploaded file. In the form section, parameters are displayed allowing users to edit relevant fields directly within the form. Users have the flexibility to make changes to ensure the Spot Fleet configuration meets their needs.

Users can also interact with the JSON preview section to directly edit the configuration. By clicking the “Edit” option within the JSON preview, users can make changes to the JSON structure and content. Once changes are made, edits can be saved by clicking the “Save” button within the JSON preview interface.

During the editing process, any changes made to the Spot Fleet configuration, whether through the form or directly in the JSON preview, are subject to a thorough set of validation checks. These checks are designed to ensure that the resulting JSON configuration adheres to the required format and constraints.

If any errors or inconsistencies are detected in the edited configuration, the SFMT tool will promptly alert users and provide detailed notifications to highlight any issues that need to be addressed. This validation mechanism is designed to prevent errors and ensure the integrity and correctness of the Spot Fleet JSON configuration.

image 10
  1. The updated JSON configuration file can be exported by clicking the “Download” button located above the JSON Preview section.

image 9

About TrackIt

TrackIt is an Amazon Web Services Advanced Tier Services Partner specializing in cloud management, consulting, and software development solutions based in Marina del Rey, CA. 

TrackIt specializes in Modern Software Development, DevOps, Infrastructure-As-Code, Serverless, CI/CD, and Containerization with specialized expertise in Media & Entertainment workflows including AWS Studio in the Cloud (SIC), Retail workflows, High-Performance Computing environments, and data storage.

In addition to providing cloud management, consulting, and modern software development services, TrackIt also provides an open-source AWS cost management tool that allows users to optimize their costs and resources on AWS.