how to create a serverless endpoint in sagemaker via cloudformation?

Viewed 9

cloudformation template below creates a sagemaker model and an endpoint configuration. my goal is to test serverless inference in sagemaker , but when i added the ServerlessConfig attribute to the endpoint config resource based on aws documentation , i get an error that it is not a valid property. any ideas?

SageMakerModel:
    Type: AWS::SageMaker::Model
    Properties: 
      Containers: 
        -
          Image: !Ref ImageURI
          ModelDataUrl: !Ref ModelData
          Environment: {"SAGEMAKER_PROGRAM": "inference.py", "SAGEMAKER_SUBMIT_DIRECTORY": !Ref ModelData}
      ExecutionRoleArn: !Ref RoleArn


SageMakerEndpointConfig:
    Type: "AWS::SageMaker::EndpointConfig"
    Properties:
      ServerlessConfig: 
        -
          MaxConcurrency: 5
0 Answers
Related