cloudformation-coverage-roadmap icon indicating copy to clipboard operation
cloudformation-coverage-roadmap copied to clipboard

AWS::Sagemaker::StudioLifecycleConfiguration (Lifecycle Configuration for Sagemaker Studio Notebooks)

Open MarcusRosen-Rio opened this issue 3 years ago • 1 comments

Name of the resource

Other

Resource name

AWS::Sagemaker::StudioLifecycleConfiguration

Description

Resource for supporting Lifecycle Configuration management on Sagemaker Studio Notebooks. Lifecycle configuration is vital to control SageMaker studio spend via auto-idle shutdown or for configuration and automated integration of private package management and git repositories especially in larger deployments across many AWS Accounts.

This resource type needs to provide the ability to attach lifecycle configuration to both the jupyter server or an image kernel and at the user level or at the domain wide-level (all users). Package command support, drift detection and resource import would be great bonuses!

Suggested Structure:

StudioLifecycleConfiguration:
    Type: AWS::Sagemaker::StudioLifecycleConfiguration
    Properties:
      DomainId: <Sagemaker Studio Domain Id>
      Scope: [ Domain | User ]
      Type: [ Server | Kernel ]
      Name:  <name of lifecycle configuration>
      Script: <base64 encoded lcc script>
 

Other Details

Sagemaker Studio Lifecycle Management APIs: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-studio-lifecycle-config.html https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/describe-studio-lifecycle-config.html https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/delete-studio-lifecycle-config.html

Attachment/Detachment against Sagemaker Studio Domain: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-domain.html

Lifecycle Configuration Examples provided by AWS: https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples

General overview of Studio Lifecycle Configuraiton: https://aws.amazon.com/blogs/machine-learning/customize-amazon-sagemaker-studio-using-lifecycle-configurations/

MarcusRosen-Rio avatar Apr 03 '22 00:04 MarcusRosen-Rio

Also note that support for lifecycle configurations appears to be broken in the current implementation of AWS::SageMaker::Domain due to lack of support for LifecycleConfigArns settings. This prevents me from using manually created lifecycle configurations with our CloudFormation managed SageMaker Domain.

Settings documented in CloudFormation reference:

  • DefaultUserSettings.JupyterServerAppSettings.DefaultResourceSpec.LifecycleConfigArn
  • DefaultUserSettings.KernelGatewayAppSettings.DefaultResourceSpec.LifecycleConfigArn

Settings currently unavailable in CloudFormation, but documented in Amazon Sagemaker API Reference:

  • LifecycleConfigArns

jakob-keller avatar Jun 21 '22 00:06 jakob-keller

Also note that support for lifecycle configurations appears to be broken in the current implementation of AWS::SageMaker::Domain due to lack of support for LifecycleConfigArns settings. This prevents me from using manually created lifecycle configurations with our CloudFormation managed SageMaker Domain.

Settings documented in CloudFormation reference:

  • DefaultUserSettings.JupyterServerAppSettings.DefaultResourceSpec.LifecycleConfigArn
  • DefaultUserSettings.KernelGatewayAppSettings.DefaultResourceSpec.LifecycleConfigArn

Settings currently unavailable in CloudFormation, but documented in Amazon Sagemaker API Reference:

  • LifecycleConfigArns

No update since June... Is this being actively worked on or should we open a separate bug ticket, such that it gets more attention and is not mingled with a feature request?

Basically, this bug renders specifying a DefaultResourceSpec.LifecycleConfigArn useless via Cdk, as the lifecycle configs need to be manually attached afterwards to the domain or user via console, cli or sdk.

NicoSeegert avatar Dec 27 '22 16:12 NicoSeegert

Agreed with @NicoSeegert. We held off building our own custom resource as it was communicated that this would be released middle of last year. Are there any updates on this? @prerna-p

MarcusRosen-Rio avatar Jan 03 '23 23:01 MarcusRosen-Rio

We need the AWS::Sagemaker::StudioLifecycleConfiguration resource as well.

jasonpnnl avatar Mar 01 '23 19:03 jasonpnnl

Is there a clear path forward on this feature request? Any ETA the team can share?

runqinggg avatar Mar 14 '23 00:03 runqinggg

Hi, is there any update on this feature?

HCharlie avatar Jul 28 '23 13:07 HCharlie

Any updates on this feature? We are setting up a SageMaker domain using CDK and would like to add a lifecycle configuration without having to create a custom resource.

l3ku avatar Aug 08 '23 12:08 l3ku