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

MIT No Attribution
81 stars 53 forks source link

[Feature Request] Programmatic LCC management examples #36

Open athewsey opened 1 year ago

athewsey commented 1 year ago

Today, the SageMaker console has UI functionality for creating and attaching/configuring personal Studio app lifecycle config scripts - which is great...

...But it seems like there are still use cases for programmatic LCC management:

  1. I recently worked with multiple users on Windows laptops, who found the UI LCC editing experience corrupted their scripts with hard-to-debug errors (due to \r\n line endings and the shell parsing the non-printing \r character as part of the command line / argument / etc in the script)
  2. AFAICT, there isn't yet a full console experience available for setup of shared spaces' LCCs?
  3. People might just want to automate these activities anyway...

As far as I know, the process of attaching LCCs to domains and users/spaces is non-trivial in the APIs, because it requires merging the domain/user/space's existing settings JSON with updates before calling UpdateDomain/UpdateUserProfile. Therefore in the past, I've used short Python helper scripts to manage the process of fetching the existing settings, calculating the update, and applying it.

Perhaps it'd be interesting to try and get those Python functions/CLI tool included in this repository, to help users manage LCCs more easily outside of the AWS Console?