Skip to content

UpdateInstanceCustomHealthStatus

Source: src/AWS/CloudMap/UpdateInstanceCustomHealthStatus.ts

Runtime binding for servicediscovery:UpdateInstanceCustomHealthStatus — pushes an instance’s health status (HEALTHY / UNHEALTHY) for a service configured with healthCheckCustomConfig. This is the push-based health mechanism: the workload reports its own health instead of being probed by Route 53. Provide the implementation with Effect.provide(AWS.CloudMap.UpdateInstanceCustomHealthStatusHttp).

const updateInstanceCustomHealthStatus =
yield* AWS.CloudMap.UpdateInstanceCustomHealthStatus(service);
yield* updateInstanceCustomHealthStatus({
InstanceId: "worker-1",
Status: "HEALTHY",
});