Home > front end >  how to create a serverless endpoint in sagemaker?
how to create a serverless endpoint in sagemaker?

Time:02-18

I followed the aws documentation ( https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-create.html#serverless-endpoints-create-config) to create a model and to use that model, i coded for a serverless endpoint config (sample code below) ,I have all the required values but this throws an error below and i'm not sure why

parameter validation failed unknown parameter inProductVariants [ 0 ]: "ServerlessConfig", must be one of : VairantName, ModelName, InitialInstanceCount , Instancetype...

response = client.create_endpoint_config(
   EndpointConfigName="abc",
   ProductionVariants=[
        {
            "ModelName": "foo",
            "VariantName": "variant-1",
            "ServerlessConfig": {
                "MemorySizeInMB": 1024,
                "MaxConcurrency": 2
            }
        } 
    ]
)

CodePudding user response:

You are probably using old boto3 version. ServerlessConfig is a very new configuration option. You need to upgrade to the latest version (1.21.1) if possible.

  • Related