aws-samples / sagemaker-studio-apps-lifecycle-config-examples

MIT No Attribution
21 stars 7 forks source link

Autostop doesn't work for shared spaces sagemaker studio #5

Closed danliaudan closed 5 months ago

danliaudan commented 5 months ago

Hello,

I use your autostop script in private spaces for sagemaker studio and it works fine. However, using the same script on shared space with the same custom image brings me an error in Cloudwatch after deploying LCC:

[W 240307 14:44:02 log:49] 404 GET /jupyterlab/default/api/sessions (127.0.0.1) 4.18ms referer=None [W 240307 14:46:01 log:49] 404 GET /jupyterlab/default/api/terminals (127.0.0.1) 4.21ms referer=None 2024-03-07T14:46:01.743687z - [auto-stop-idle] - An error accurred while checking idle state. Exception: string indices must be integers

Does anyone know what is the matter and how to fix this? Thanks in advance😄

giuseppeporcelli commented 5 months ago

Hi @danliaudan , shared spaces are supported through SageMaker Studio Classic rather than the new Studio JupyterLab applications. You should refer to the Studio Classic auto-shutdown extension available here: https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension. Thank you.