- Newest
- Most votes
- Most comments
Based on the configuration you've provided and the behavior of EC2 Fleet with the "instant" type, AWS does not guarantee launching the next priority instance type if the first instance type remains in a pending state.
For EC2 Fleets of type "instant", the fleet makes a single attempt to launch the target capacity. If the fleet cannot launch the full target capacity, it will not retry or switch to alternative instance types. This means that if your t2.nano instances remain in a pending state, the fleet will not automatically attempt to launch t2.small instances to meet the target capacity.
The "instant" fleet type is designed for use cases where you want to launch capacity quickly and do not want to wait for the capacity to be fulfilled if it's not immediately available. It does not provide the same level of automatic failover or retry mechanisms that are available with other fleet types like "maintain" or "request".
In your specific configuration, with a TotalTargetCapacity of 2 and two instance types specified, the fleet will attempt to launch both instances simultaneously. However, if either or both instances fail to launch or remain in a pending state, the fleet will not make additional attempts to launch instances or switch to the alternative instance type.
To achieve more resilience and ensure that your desired capacity is met, you might consider using a different fleet type, such as "maintain", which continuously attempts to maintain the target capacity and can switch between instance types as needed. Alternatively, you could implement your own logic to check the status of the launched instances and create additional fleets or instances if the desired capacity is not met.
Sources
CreateFleet - Amazon Elastic Compute Cloud
Create an EC2 Fleet - Amazon Elastic Compute Cloud
Relevant content
asked a year ago
asked 4 years ago
- AWS OFFICIALUpdated 10 months ago
