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.”

Set defaults from the AWS CLI

Focus mode
Set defaults from the AWS CLI - Amazon SageMaker AI
Important

Custom IAM policies that allow Amazon SageMaker Studio or Amazon SageMaker Studio Classic to create Amazon SageMaker resources must also grant permissions to add tags to those resources. The permission to add tags to resources is required because Studio and Studio Classic automatically tag any resources they create. If an IAM policy allows Studio and Studio Classic to create resources but does not allow tagging, "AccessDenied" errors can occur when trying to create resources. For more information, see Provide permissions for tagging SageMaker AI resources.

AWS managed policies for Amazon SageMaker AI that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

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.

You can set default lifecycle configuration scripts from the AWS CLI for the following resources:

  • Domains

  • User profiles

  • Shared spaces

The following sections outline how to set default lifecycle configuration scripts from the AWS CLI.

Prerequisites

Before you begin, complete the following prerequisites:

Set a default lifecycle configuration when creating a new resource

To set a default lifecycle configuration when creating a new domain, user profile, or space, pass the ARN of your previously created lifecycle configuration as part of one of the following AWS CLI commands:

You must pass the lifecycle configuration ARN for the following values in the KernelGateway or JupyterServer default settings:

  • DefaultResourceSpec:LifecycleConfigArn - This specifies the default lifecycle configuration for the application type.

  • LifecycleConfigArns - This is the list of all lifecycle configurations attached to the application type. The default lifecycle configuration must also be part of this list.

For example, the following API call creates a new user profile with a default lifecycle configuration.

aws sagemaker create-user-profile --domain-id domain-id \ --user-profile-name user-profile-name \ --region region \ --user-settings '{ "KernelGatewayAppSettings": { "DefaultResourceSpec": { "InstanceType": "ml.t3.medium", "LifecycleConfigArn": "lifecycle-configuration-arn" }, "LifecycleConfigArns": [lifecycle-configuration-arn-list] } }'

Set a default lifecycle configuration for an existing resource

To set or update the default lifecycle configuration for an existing resource, pass the ARN of your previously created lifecycle configuration as part of one of the following AWS CLI commands:

You must pass the lifecycle configuration ARN for the following values in the KernelGateway or JupyterServer default settings:

  • DefaultResourceSpec:LifecycleConfigArn - This specifies the default lifecycle configuration for the application type.

  • LifecycleConfigArns - This is the list of all lifecycle configurations attached to the application type. The default lifecycle configuration must also be part of this list.

For example, the following API call updates a user profile with a default lifecycle configuration.

aws sagemaker update-user-profile --domain-id domain-id \ --user-profile-name user-profile-name \ --region region \ --user-settings '{ "KernelGatewayAppSettings": { "DefaultResourceSpec": { "InstanceType": "ml.t3.medium", "LifecycleConfigArn": "lifecycle-configuration-arn" }, "LifecycleConfigArns": [lifecycle-configuration-arn-list] } }'

The following API call updates a domain to set a new default lifecycle configuration.

aws sagemaker update-domain --domain-id domain-id \ --region region \ --default-user-settings '{ "JupyterServerAppSettings": { "DefaultResourceSpec": { "InstanceType": "system", "LifecycleConfigArn": "lifecycle-configuration-arn" }, "LifecycleConfigArns": [lifecycle-configuration-arn-list] } }'
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.