How to create a serverless endpoint configuration?

0

based on the sample code provided here , https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-create.html#serverless-endpoints-create-config

I created a model via lambda, now when i try to create a serverless endpoint config (sample code below) , i keep getting -> parameter validation failed unknown parameter in ProductVariants [ 0 ]: "ServerlessConfig", must be one of : VairantName, ModelName, InitialInstanceCount , Instancetype...

response = client.create_endpoint_config(
   EndpointConfigName="endpoint-new",
   ProductionVariants=[
        {
            "ModelName": "MyModel",
            "VariantName": "AllTraffic",
            "ServerlessConfig": {
                "MemorySizeInMB": 2048,
                "MaxConcurrency": 10
            }
        } 
    ]
)
已提問 2 年前檢視次數 570 次
2 個答案
1
已接受的答案

The cause might be that your SageMaker Python SDK is not updated to the latest version. Please make sure you update it to the latest version as well as the AWS SDK for Python (boto3). You can use pip:

pip install --upgrade boto3
pip install --upgrade sagemaker

For a sample notebook you can have a look here. More information on the documentation page.

AWS
Ioan
已回答 2 年前
1

Hi,

Can you confirm the version of boto3 that you are using? This error is likely to be caused because of an older version of boto3 that does not include capability for serverless inference.

Serverless inference was introduced in version 1.20.18

Hope this helps,

Georgios

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南