Skip to content

Standby

Source: src/AWS/AutoScaling/Standby.ts

Runtime binding for the EnterStandby / ExitStandby operations (IAM actions autoscaling:EnterStandby and autoscaling:ExitStandby scoped to the group ARN).

Temporarily pulls instances out of service — to debug a misbehaving instance, apply a patch, or drain it during maintenance — and puts them back afterwards. Provide the implementation with Effect.provide(AWS.AutoScaling.StandbyHttp).

// init — bind the operations to the group
const standby = yield* AWS.AutoScaling.Standby(group);
// runtime — take the instance out of rotation
yield* standby.enter({
InstanceIds: [instanceId],
ShouldDecrementDesiredCapacity: true,
});
// ... perform maintenance ...
// runtime — put it back in service
yield* standby.exit({ InstanceIds: [instanceId] });