Skip to content

GetInstance

Source: src/AWS/CloudMap/GetInstance.ts

Runtime binding for servicediscovery:GetInstance — reads a single registered instance of the bound Service by its instance ID, returning its full attribute map. Provide the implementation with Effect.provide(AWS.CloudMap.GetInstanceHttp).

const getInstance = yield* AWS.CloudMap.GetInstance(service);
const { Instance } = yield* getInstance({ InstanceId: "worker-1" });
console.log(Instance?.Attributes?.AWS_INSTANCE_IPV4);