Created
October 3, 2023 17:03
-
-
Save ojacques/7992f17d6a32afd9dabbd3526f305bf4 to your computer and use it in GitHub Desktop.
List and delete all Amazon SageMaker KernelGateway apps which are still running
This file contains hidden or 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
aws sagemaker list-apps --query "Apps[?AppType=='KernelGateway' && Status=='InService']" | jq -r '.[] | "\(.AppName) \(.DomainId) \(.UserProfileName)"' | while read AppName DomainId UserProfileName; do echo Deleting $AppName for user $UserProfileName ... && aws sagemaker delete-app --domain-id $DomainId --app-type KernelGateway --app-name $AppName --user-profile $UserProfileName; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For all apps