Forked from ojacques/aws-sagemaker-delete-apps.sh
Last active
November 22, 2024 07:31
-
-
Save non7top/236bc900ef0bb5d61135922251e5e281 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[?Status=='InService']" | jq -r '.[] | "\(.AppName) \(.DomainId) \(.UserProfileName) \(.AppType)"' | \ | |
while read AppName DomainId UserProfileName AppType; do \ | |
echo Deleting $AppName for user $UserProfileName ... && \ | |
aws sagemaker delete-app --domain-id $DomainId --app-type $AppType --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