SetInstanceHealth
Source:
src/AWS/AutoScaling/SetInstanceHealth.ts
Runtime binding for the SetInstanceHealth operation (IAM action
autoscaling:SetInstanceHealth scoped to the group ARN).
Reports an instance’s health to EC2 Auto Scaling — the backbone of custom
health checks: a watchdog Lambda (or the instance itself) flags an instance
Unhealthy and the group replaces it. Provide the implementation with
Effect.provide(AWS.AutoScaling.SetInstanceHealthHttp).
Custom Health Checks
Section titled “Custom Health Checks”// init — bind the operation to the groupconst setInstanceHealth = yield* AWS.AutoScaling.SetInstanceHealth(group);
// runtime — mark the instance unhealthy so the group replaces ityield* setInstanceHealth({ InstanceId: instanceId, HealthStatus: "Unhealthy",});