Created
December 21, 2019 00:04
-
-
Save leehanchung/d32ab92d647a84dfcb47632ca3c31207 to your computer and use it in GitHub Desktop.
Bash script to create Sagemaker Inference Endpoint from Sagemaker Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
MODEL_NAME=<<name your model>> | |
ENDPOINT_CONFIG_NAME=<<name your endpointn config>> | |
ENDPOINT_NAME=<<name your endpoint>> | |
# Using one ml.c4.large instance for the endpoint | |
PRODUCTION_VARIANTS="VariantName=Default,ModelName=${MODEL_NAME},"\ | |
"InitialInstanceCount=1,InstanceType=ml.c4.large" | |
aws sagemaker create-endpoint-config --endpoint-config-name ${ENDPOINT_CONFIG_NAME} \ | |
--production-variants ${PRODUCTION_VARIANTS} | |
aws sagemaker create-endpoint --endpoint-name ${ENDPOINT_NAME} \ | |
--endpoint-config-name ${ENDPOINT_CONFIG_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment