Spot Fleet Requests created via CLI aren't showing up in the Console UI so it's more difficult to delete them!
When I create a Spot Fleet Request in the AWS Console UI, it shows up with its fulfilled status, and I can cancel the entire request:
However, creating a Spot Fleet via CLI returns a FleetId
but does not show up in the Console UI?.
Am I missing something in the CLI configuration, or is this expected behavior?
aws ec2 create-fleet --cli-input-json '{
"DryRun": false,
"TerminateInstancesWithExpiration": true,
"SpotOptions": {
"AllocationStrategy": "priceCapacityOptimized",
"InstanceInterruptionBehavior": "terminate",
"SingleAvailabilityZone": false,
"SingleInstanceType": false,
"MinTargetCapacity": 0
},
"OnDemandOptions": {
"AllocationStrategy": "lowestPrice"
},
"TargetCapacitySpecification": {
"TotalTargetCapacity": 25,
"OnDemandTargetCapacity": 0,
"SpotTargetCapacity": 25,
"DefaultTargetCapacityType": "spot",
"TargetCapacityUnitType": "units"
},
"Type": "maintain",
"LaunchTemplateConfigs": [
{
"LaunchTemplateSpecification": {
"LaunchTemplateId": "lt-00f2b397b7aef2321",
"Version": "$Default"
},
"Overrides": [
{
"SubnetId": "subnet-0d6b146fb6817f874,subnet-010e87227eaaf7b8e,subnet-0b9bd6ad35c29c4e6,subnet-0580ab4857b24130a,subnet-0a5ccc9aee5dd371b,subnet-03d9381d17e2e60d6",
"InstanceRequirements": {
"ExcludedInstanceTypes": [],
"AllowedInstanceTypes": [
"c*"
],
"VCpuCount": {
"Min": 2,
"Max": 8
},
"MemoryMiB": {
"Min": 4096,
"Max": 16384
},
"TotalLocalStorageGB": {
"Min": 16
},
"LocalStorageTypes": [
"ssd"
],
"BurstablePerformance": "excluded"
}
}
]
}
]
}'
The key issue lies in how you’re creating the fleet.
You’re using the aws ec2 create-fleet command, which creates an EC2 Fleet, not a Spot Fleet Request (SFR). While both can launch Spot Instances, EC2 Fleets do not appear under the Spot Requests section in the EC2 Console. Instead, they appear under EC2 → Fleets.
If you’re specifically trying to create a Spot Fleet Request (which does appear in the console under Spot → Spot Requests), you need to use:
aws ec2 request-spot-fleet --spot-fleet-request-config file://config.json
Your current create-fleet command is working as expected, and the Fleet ID you see (fleet-555c2e1a-...) confirms it’s an EC2 Fleet — which is why it’s not visible in the UI section for Spot Fleet Requests.