Skip to content

GetServiceAttributes

Source: src/AWS/CloudMap/GetServiceAttributes.ts

Runtime binding for servicediscovery:GetServiceAttributes — reads the custom key/value attributes stored on the bound Service (declared via the Service resource’s attributes prop or written out-of-band). Use it to distribute small pieces of service-level configuration to consumers without an extra config store. Provide the implementation with Effect.provide(AWS.CloudMap.GetServiceAttributesHttp).

const getServiceAttributes =
yield* AWS.CloudMap.GetServiceAttributes(service);
const { ServiceAttributes } = yield* getServiceAttributes();
console.log(ServiceAttributes?.Attributes?.tier);