Skip to content

feat(aspect): sagemaker-automated-shutdown #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

angelchaudhary01
Copy link
Contributor

Adds in aspect for an automated shutdown mechanism for SageMaker Notebook Instances. Provides configurable Idle Timeout Time as metric used to determine what instances should be shutdown.

stack: Stack
): void {
const lifecycleConfig = this.createLifecycleConfig(instance, stack);
instance.lifecycleConfigName = lifecycleConfig.ref;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will overwrite the existing lifecycle config if there is one right? Is there a way to append to an existing lifecycle script if the user has already defined one? I didn't try this when we used this before but if we can't, we need to define a clear docstring that tells the user that this will overwrite any existing lifecycle configuration policy they've defined

}

export class SageMakerAutomatedShutdown implements IAspect {
private processedInstances: Set<string> = new Set();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do this for this Aspect?

@@ -0,0 +1,152 @@
import requests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this file in a scripts directory in this folder

derrike and others added 4 commits March 25, 2025 12:05
* vitest

* chore: replace jest with vitest

* fix from rebase

* add reference type

* yarn lock

* try dependency fix

* fix .only modifier

* try removing from main deps

* remove deps2

* try removing dep resolutions

* try deps again

* remove more resolutions

* back to no resolutions

* vitest compat1

* vitest compat2

* vitest compat3

* vitest compat 4

* final vitest compat

* add watch w/ no cov

* silent mode by default

* remove jest types
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-proserve-lib/actions/runs/14048726094

------

*Automatically created by projen via the "upgrade-dev-deps-main" workflow*

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
auto-merge was automatically disabled March 25, 2025 16:06

Head branch was pushed to by a user without write access

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.

5 participants