Update and detach lifecycle configurations
Important
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see Amazon SageMaker Studio.
A lifecycle configuration script can't be changed after it's created. To update your script, you must create a new lifecycle configuration script and attach it to the respective domain, user profile, or shared space. For more information about creating and attaching the lifecycle configuration, see Create and associate a lifecycle configuration.
The following topic shows how to detach a lifecycle configuration using the AWS CLI and SageMaker console.
Prerequisites
Before detaching a lifecycle configuration, you must complete the following prerequisite.
-
To successfully detach a lifecycle configuration, no running application can be using the lifecycle configuration. You must first shut down the running applications as shown in Shut Down and Update SageMaker Studio Classic and Studio Classic Apps.
Detach using the AWS CLI
To detach a lifecycle configuration using the AWS CLI, remove the desired lifecycle configuration from the list of lifecycle configurations attached to the resource and pass the list as part of the respective command:
For example, the following command removes all lifecycle configurations for KernelGateways attached to the domain.
aws sagemaker update-domain --domain-id
domain-id
\ --regionregion
\ --default-user-settings '{ "KernelGatewayAppSettings": { "LifecycleConfigArns": [] } }'