Created
November 25, 2019 13:55
-
-
Save potter0815/2ca8e3b9cd86e68dc86a36859461392f to your computer and use it in GitHub Desktop.
shutdown a sagemaker notebook instance from within a Jupyter notebook
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
# in a code block | |
%%sh | |
| |
NOTEBOOK_NAME=$(jq '.ResourceName' /opt/ml/metadata/resource-metadata.json --raw-output) | |
aws sagemaker stop-notebook-instance --notebook-instance-name $NOTEBOOK_NAME | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment