Endpoint
Learn how to create, update, and manage AWS SageMaker Endpoints using Alchemy Cloud Control.
The Endpoint resource lets you manage AWS SageMaker Endpoints for deploying machine learning models. Endpoints provide a way to host your model for real-time inference, allowing applications to make predictions based on input data.
Minimal Example
Section titled “Minimal Example”Create a basic SageMaker Endpoint with required properties and some common optional configurations.
import AWS from "alchemy/aws/control";
const sageMakerEndpoint = await AWS.SageMaker.Endpoint("mySageMakerEndpoint", { EndpointConfigName: "myEndpointConfig", RetainAllVariantProperties: true});
Advanced Configuration
Section titled “Advanced Configuration”Configure a SageMaker Endpoint with a deployment configuration and tags for better management.
const advancedSageMakerEndpoint = await AWS.SageMaker.Endpoint("advancedSageMakerEndpoint", { EndpointConfigName: "myAdvancedEndpointConfig", DeploymentConfig: { AutoRollbackConfiguration: { Alarms: [ { AlarmName: "EndpointErrorAlarm", AlarmType: "ERROR" } ] } }, Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "AIModelDeployment" } ]});
Excluding Variant Properties
Section titled “Excluding Variant Properties”Create a SageMaker Endpoint while excluding specific variant properties from the deployment.
const variantExclusionEndpoint = await AWS.SageMaker.Endpoint("variantExclusionEndpoint", { EndpointConfigName: "myVariantExclusionConfig", ExcludeRetainedVariantProperties: [ { VariantName: "LowPriorityVariant" } ], RetainDeploymentConfig: false});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”Adopt an existing SageMaker Endpoint if it already exists, preventing failure due to duplication.
const adoptExistingEndpoint = await AWS.SageMaker.Endpoint("adoptExistingEndpoint", { EndpointConfigName: "myExistingEndpointConfig", adopt: true});