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 年前572 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则