Description
Today, when users write the following manifest:
count:
range:
min: 1
max: 10
cpu_percentage: 70
Copilot sets the capacity provider strategy for the service to be FARGATE_SPOT:
CapacityProviderStrategy:
- CapacityProvider: FARGATE_SPOT
Weight: 1
Instead, we should leave it as FARGATE and set the field only if the spot_from field is specified:
count:
range:
min: 1
max: 10
spot_from: 1
Fix
The issue seems to be because we're adding spot by default:
|
var cps []*template.CapacityProviderStrategy |
|
// if Spot specified as count, then weight on Spot CPS should be 1 |
|
cps = append(cps, &template.CapacityProviderStrategy{ |
|
Weight: aws.Int(1), |
|
CapacityProvider: capacityProviderFargateSpot, |
|
}) |
|
// Return if only spot is specifed as count |
Description
Today, when users write the following manifest:
Copilot sets the capacity provider strategy for the service to be
FARGATE_SPOT:Instead, we should leave it as
FARGATEand set the field only if thespot_fromfield is specified:Fix
The issue seems to be because we're adding spot by default:
copilot-cli/internal/pkg/deploy/cloudformation/stack/transformers.go
Lines 144 to 150 in 14768fd