Skip to content

Endpoint

Source: src/AWS/SageMaker/Endpoint.ts

An Amazon SageMaker Endpoint — the live, invocable deployment of an EndpointConfig. Provisioning takes minutes and bills while the endpoint exists (serverless variants bill per request; instance variants bill per instance-hour). Destroy endpoints promptly.

Invoke a deployed endpoint from a function with AWS.SageMakerRuntime.InvokeEndpoint.

import * as AWS from "alchemy/AWS";
const endpoint = yield* AWS.SageMaker.Endpoint("MyEndpoint", {
endpointConfigName: config.endpointConfigName,
});
// init
const invoke = yield* AWS.SageMakerRuntime.InvokeEndpoint(
endpoint.endpointName,
);
// runtime
const result = yield* invoke({
ContentType: "application/json",
Body: JSON.stringify({ instances: [[1, 2, 3, 4]] }),
});