aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 56 forks source link

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

Open MarcusRosen-Rio opened 2 years ago

MarcusRosen-Rio commented 2 years ago

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/

jakob-keller commented 2 years ago

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:

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

NicoSeegert commented 1 year ago

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.

MarcusRosen-Rio commented 1 year ago

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

jasonpnnl commented 1 year ago

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

runqinggg commented 1 year ago

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

HCharlie commented 1 year ago

Hi, is there any update on this feature?

l3ku commented 1 year ago

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.