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
            }
        } 
    ]
)
asked 2 years ago569 views
2 Answers
1
Accepted Answer

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
answered 2 years ago
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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions