Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Create and attach lifecycle configurations in Studio

Focus mode
Create and attach lifecycle configurations in Studio - Amazon SageMaker AI

The following section provides AWS CLI commands to create a lifecycle configuration, attach a lifecycle configuration when creating a new user profile, and attach a lifecycle configuration when updating a user profile. For prerequisites and general steps on creating and attaching lifecycle configurations in Studio, see Lifecycle configuration creation.

When creating your Studio lifecycle configuration with the create-studio-lifecycle-config command, be sure to specify that the studio-lifecycle-config-app-type is CodeEditor. The following example shows how to create a new Studio lifecycle configuration for your Code Editor application.

aws sagemaker create-studio-lifecycle-config \ --studio-lifecycle-config-name my-code-editor-lcc \ --studio-lifecycle-config-content $LCC_CONTENT \ --studio-lifecycle-config-app-type CodeEditor

Note the ARN of the newly created lifecycle configuration that is returned. When attaching a lifecycle configuration, provide this ARN within the LifecycleConfigArns list of CodeEditorAppSettings.

You can attach a lifecycle configuration when creating a user profile or domain. The following example shows how to create a new user profile with the lifecycle configuration attached. You can also create a new domain with a lifecycle configuration attached by using the create-domain command.

# Create a new UserProfile aws sagemaker create-user-profile \ --domain-id domain-id \ --user-profile-name user-profile-name \ --user-settings '{ "CodeEditorAppSettings": { "LifecycleConfigArns": [lifecycle-configuration-arn-list] } }'

You can alternatively attach a lifecycle configuration when updating a user profile or domain. The following example shows how to update a user profile with the lifecycle configuration attached. You can also update a new domain with a lifecycle configuration attached by using the update-domain command.

# Update a UserProfile aws sagemaker update-user-profile \ --domain-id domain-id \ --user-profile-name user-profile-name \ --user-settings '{ "CodeEditorAppSettings": { "LifecycleConfigArns": [lifecycle-configuration-arn-list] } }'
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.