Skip to content

ec2: Fix Fleet on-demand instance provisioning#121

Merged
nik-localstack merged 1 commit intolocalstack:localstackfrom
nik-localstack:nikos/unc-301
Mar 2, 2026
Merged

ec2: Fix Fleet on-demand instance provisioning#121
nik-localstack merged 1 commit intolocalstack:localstackfrom
nik-localstack:nikos/unc-301

Conversation

@nik-localstack
Copy link

EC2 Fleet was not launching the correct number of on-demand instances in two scenarios:

  • When OnDemandTargetCapacity was greater than 1, only a single instance was launched instead of the requested amount.
  • When OnDemandTargetCapacity was omitted from the request, the remaining capacity fallback did not behave correctly.

@nik-localstack nik-localstack self-assigned this Feb 26, 2026
@nik-localstack nik-localstack marked this pull request as ready for review February 26, 2026 16:58
target_capacity_specification.get(
"OnDemandTargetCapacity", self.target_capacity
)
target_capacity_specification.get("OnDemandTargetCapacity", 0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any remaining capacity is handled in line 140

@nik-localstack nik-localstack merged commit dff16c8 into localstack:localstack Mar 2, 2026
69 of 70 checks passed
@nik-localstack nik-localstack deleted the nikos/unc-301 branch March 2, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants