Skip to content


Sagemaker Utilities


There are some command line utilities to help manage sagemaker endpoints.



Argument Description
action The action to take. Valid values are create or delete
endpoint-name The name of the endpoint to create or delete
endpoint-config The name of the endpoint config to use


brew tap jmoney/aws
brew install sagemaker-endpoint-management

Run locally

go run cmd/cli/endpoint/main.go --action create --endpoint-name <endpoint-name> --endpoint-config <endpoint-config>

Sagemaker Lambda Proxy

A proxy that runs as a Lambda to sagemaker to testing certain sagemaker models. This is a proof of concept and not meant for production use.


brew bundle --file Brewfile
tfenv use


make build
terraform init
AWS_PROFILE=<profile> terraform plan -out=plan.out -var endpoint_name=<endpoint-name>
AWS_PROFILE=<profile> terraform apply plan.out


AWS_PROFILE=<profile> terraform destroy -var endpoint_name=<endpoint-name>


curl --silent --http1.1 --request POST --header "Content-Type: application/json" --header "X-NONCE: $(terraform output -json | jq -r .nonce.value)" "$(terraform output -json | jq -r .url.value)" -d @data.json | jq -r '.[].generation.content'

There is a data.json file at the root of this repo with a question you can use.


There is a dockerfile built to be used with lambda for the container image package type. It has not been tested for local runs but in theory it should work. Lambda does not allow images pulled from ghcr and only AWS ECR registries so the docker image would need to be mirrored from ghcr to ecr in some way.