Skip to content

Support for multi-subnet fleets. #115

Open

Description

@bethac07
No description provided.

Activity

  1. ErinWeisbart commented on Oct 4, 2022

    @ErinWeisbart
    Member

    Depending on how your subnets are set up, you may have limitations on the number of machines you can use in the subnets because IPs are limited.
    Would also simplify troubleshooting when the machine types you want are limited in availability.

    Can probably fix by restructuring fleet file. (Make a dummy request in the console and copy that structure to our fleet file).

  2. ErinWeisbart commented on Oct 8, 2024

    @ErinWeisbart
    Member

    Tried this config to get rid of subnet. Worked once. Second time gave me
    spotFleetRequestConfigurationInvalid : m5.xlarge, ami-fad25980, Linux/UNIX: Security group sg-GROUP and subnet subnet-SUBNET belong to different networks.

    {
    "IamFleetRole": "arn:aws:iam::XXXXXXXXXXXX:role/aws-ec2-spot-fleet-role",
    "AllocationStrategy": "lowestPrice",
    "TerminateInstancesWithExpiration": true,
    "LaunchSpecifications": [
            {
            "ImageId": "ami-fad25980",
            "KeyName": "KEYNAME",
            "IamInstanceProfile": {
                    "Arn": "arn:aws:iam::XXXXXXXXXXXX:instance-profile/ecsInstanceRole"
            },
            "BlockDeviceMappings": [
            {
                            "DeviceName": "/dev/xvda",
                            "Ebs": {
                            "DeleteOnTermination": true,
                            "VolumeType": "gp2",
                            "VolumeSize": 8,
                            "SnapshotId": "snap-04007a196c0f3f398"
                    }
                    },
                    {
                    "DeviceName": "/dev/xvdcz",
                    "Ebs": {
                            "DeleteOnTermination": true,
                            "VolumeType": "gp2"
                    }
                    }
            ],
            "SecurityGroups": [{"GroupId":"sg-ZZZZZZZZZ"}]
                    }
            ],
    "Type": "maintain"
    }
    
  3. ErinWeisbart commented on May 15, 2026

    @ErinWeisbart
    Member

    This works for multi-subnet fleet requests (h/t @bethac07 )

    {
    "IamFleetRole": "arn:aws:iam::XXXXXXXXXXXX:role/aws-ec2-spot-fleet-tagging-role",
    "AllocationStrategy": "lowestPrice",
    "TerminateInstancesWithExpiration": true,
    "LaunchSpecifications": [
        {
        "ImageId": "ami-0ce03502c5bb5e188",
        "SubnetId": "subnet-AAAAAAAA, subnet-BBBBBBBBB, subnet-CCCCCCCC, subnet-DDDDDDDDD",
        "KeyName": "KEYNAME",
        "IamInstanceProfile": {
    "Arn": "arn:aws:iam:: XXXXXXXXXXXX:instance-profile/ecsInstanceRole"
        },
         "SecurityGroups": [
            {
              "GroupId": "sg-XXXXXXXXXXXX"
            }
    ],
        "BlockDeviceMappings": [
            {
        "DeviceName": "/dev/xvda",
        "Ebs": {
        "DeleteOnTermination": true,
        "VolumeType": "gp3",
        "VolumeSize": 24,
        "SnapshotId": "snap-0a7b4ece894d62882"
        }
    },
    {
        "DeviceName": "/dev/xvdcz",
        "Ebs": {
        "DeleteOnTermination": true,
        "VolumeType": "gp3"
        }
    }
        ]
        }
    ],
    "Type": "maintain"
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions