Skip to content

Delete SageMaker Notebook instances across regions#1

Open
mikerichardson wants to merge 72 commits intomanjunathadinka:masterfrom
mikerichardson:claude/delete-sagemaker-notebooks-a9frR
Open

Delete SageMaker Notebook instances across regions#1
mikerichardson wants to merge 72 commits intomanjunathadinka:masterfrom
mikerichardson:claude/delete-sagemaker-notebooks-a9frR

Conversation

@mikerichardson
Copy link

No description provided.

Ville Walveranta added 30 commits February 17, 2018 03:08
…clear-aws.sh' that will clear set AWS environment varialbles.
…tively pull MFA session init time via the CLI).
…n expiration times internally (and much more).
Ville Walveranta and others added 30 commits April 10, 2018 03:55
…y.txt: allow GetRole without MFA, sorted API lists
…minated the dependency for the default profile
This script searches for and deletes Amazon SageMaker Notebook instances
across all AWS regions, including opt-in regions. Features:
- Scans all regions (including opt-in regions)
- Lists all SageMaker notebook instances in each region
- Stops running notebooks before deletion
- Provides detailed progress and summary statistics
- Includes error handling and prerequisite checks
Modified the script to only scan AWS regions that are enabled for the
account (opt-in-not-required or opted-in status), excluding regions
that have not been opted-in. This prevents unnecessary API calls to
disabled regions and focuses on regions actually in use.
Removed the notebook stopping logic to simplify the script. The script
now assumes all notebook instances are already stopped and proceeds
directly to deletion. This makes the script faster and simpler for
scenarios where instances are known to be stopped.

Changes:
- Removed stop_notebook() and get_notebook_status() functions
- Simplified main processing loop to delete directly
- Added note in script header about stopped instance assumption
- Added helpful error message if deletion fails due to running instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants