AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.

For an overview of Amazon SageMaker, see How It Works.

Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax.

Calls to InvokeEndpoint are authenticated by using Amazon Web Services Signature Version 4. For information, see Authenticating Requests (Amazon Web Services Signature Version 4) in the Amazon S3 API Reference.

A customer's model containers must respond to requests within 60 seconds. The model itself can have a maximum processing time of 60 seconds before responding to invocations. If your model is going to take 50-60 seconds of processing time, the SDK socket timeout should be set to be 70 seconds.

Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to InvokeEndpointAsync.

Namespace: Amazon.SageMakerRuntime
Assembly: AWSSDK.SageMakerRuntime.dll
Version: 3.x.y.z

Syntax

C#
public virtual InvokeEndpointResponse InvokeEndpoint(
         InvokeEndpointRequest request
)

Parameters

request
Type: Amazon.SageMakerRuntime.Model.InvokeEndpointRequest

Container for the necessary parameters to execute the InvokeEndpoint service method.

Return Value


The response from the InvokeEndpoint service method, as returned by SageMakerRuntime.

Exceptions

ExceptionCondition
InternalDependencyException Your request caused an exception with an internal dependency. Contact customer support.
InternalFailureException An internal failure occurred.
ModelErrorException Model (owned by the customer in the container) returned 4xx or 5xx error code.
ModelNotReadyException Either a serverless endpoint variant's resources are still being provisioned, or a multi-model endpoint is still downloading or loading the target model. Wait and try your request again.
ServiceUnavailableException The service is unavailable. Try your call again.
ValidationErrorException Inspect your request and try again.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also