TerminateInstanceInAutoScalingGroup
Source:
src/AWS/AutoScaling/TerminateInstanceInAutoScalingGroup.ts
Runtime binding for the TerminateInstanceInAutoScalingGroup operation
(IAM action autoscaling:TerminateInstanceInAutoScalingGroup scoped to the
group ARN).
Requests termination of a specific instance, optionally decrementing the
desired capacity — e.g. recycling a wedged worker (the group launches a
replacement) or retiring the instance it runs on. Provide the
implementation with
Effect.provide(AWS.AutoScaling.TerminateInstanceInAutoScalingGroupHttp).
Manual Scaling
Section titled “Manual Scaling”// init — bind the operation to the groupconst terminateInstance = yield* AWS.AutoScaling.TerminateInstanceInAutoScalingGroup(group);
// runtime — terminate and let the group launch a replacementconst { Activity } = yield* terminateInstance({ InstanceId: instanceId, ShouldDecrementDesiredCapacity: false,});