

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::SageMaker::App
<a name="aws-resource-sagemaker-app"></a>

Creates a running app for the specified UserProfile. This operation is automatically invoked by Amazon SageMaker AI upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.

## Syntax
<a name="aws-resource-sagemaker-app-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-sagemaker-app-syntax.json"></a>

```
{
  "Type" : "AWS::SageMaker::App",
  "Properties" : {
      "[AppName](#cfn-sagemaker-app-appname)" : String,
      "[AppType](#cfn-sagemaker-app-apptype)" : String,
      "[DomainId](#cfn-sagemaker-app-domainid)" : String,
      "[RecoveryMode](#cfn-sagemaker-app-recoverymode)" : Boolean,
      "[ResourceSpec](#cfn-sagemaker-app-resourcespec)" : ResourceSpec,
      "[Tags](#cfn-sagemaker-app-tags)" : [ Tag, ... ],
      "[UserProfileName](#cfn-sagemaker-app-userprofilename)" : String
    }
}
```

### YAML
<a name="aws-resource-sagemaker-app-syntax.yaml"></a>

```
Type: AWS::SageMaker::App
Properties:
  [AppName](#cfn-sagemaker-app-appname): String
  [AppType](#cfn-sagemaker-app-apptype): String
  [DomainId](#cfn-sagemaker-app-domainid): String
  [RecoveryMode](#cfn-sagemaker-app-recoverymode): Boolean
  [ResourceSpec](#cfn-sagemaker-app-resourcespec): 
    ResourceSpec
  [Tags](#cfn-sagemaker-app-tags): 
    - Tag
  [UserProfileName](#cfn-sagemaker-app-userprofilename): String
```

## Properties
<a name="aws-resource-sagemaker-app-properties"></a>

`AppName`  <a name="cfn-sagemaker-app-appname"></a>
The name of the app.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`AppType`  <a name="cfn-sagemaker-app-apptype"></a>
The type of app.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `JupyterServer | KernelGateway | RStudioServerPro | RSessionGateway | Canvas`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DomainId`  <a name="cfn-sagemaker-app-domainid"></a>
The domain ID.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RecoveryMode`  <a name="cfn-sagemaker-app-recoverymode"></a>
Enables recovery mode for the SageMaker Studio application. When enabled, recovery mode allows you to access your Studio application when a configuration issue prevents normal startup. For more information, see [Recovery mode](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-troubleshooting.html).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourceSpec`  <a name="cfn-sagemaker-app-resourcespec"></a>
Specifies the ARNs of a SageMaker image and SageMaker image version, and the instance type that the version runs on.  
*Required*: No  
*Type*: [ResourceSpec](aws-properties-sagemaker-app-resourcespec.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-sagemaker-app-tags"></a>
An array of key-value pairs to apply to this resource.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-sagemaker-app-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserProfileName`  <a name="cfn-sagemaker-app-userprofilename"></a>
The user profile name.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-sagemaker-app-return-values"></a>

### Ref
<a name="aws-resource-sagemaker-app-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the app type, app name, Domain ID, and user profile name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-sagemaker-app-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-sagemaker-app-return-values-fn--getatt-fn--getatt"></a>

`AppArn`  <a name="AppArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the app, such as `arn:aws:sagemaker:us-west-2:account-id:app/my-app-name`.

`BuiltInLifecycleConfigArn`  <a name="BuiltInLifecycleConfigArn-fn::getatt"></a>
The lifecycle configuration that runs before the default lifecycle configuration. It can override changes made in the default lifecycle configuration.

# AWS::SageMaker::App ResourceSpec
<a name="aws-properties-sagemaker-app-resourcespec"></a>

Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on.

**Note**  
When both `SageMakerImageVersionArn` and `SageMakerImageArn` are passed, `SageMakerImageVersionArn` is used. Any updates to `SageMakerImageArn` will not take effect if `SageMakerImageVersionArn` already exists in the `ResourceSpec` because `SageMakerImageVersionArn` always takes precedence. To clear the value set for `SageMakerImageVersionArn`, pass `None` as the value.

## Syntax
<a name="aws-properties-sagemaker-app-resourcespec-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-sagemaker-app-resourcespec-syntax.json"></a>

```
{
  "[InstanceType](#cfn-sagemaker-app-resourcespec-instancetype)" : String,
  "[LifecycleConfigArn](#cfn-sagemaker-app-resourcespec-lifecycleconfigarn)" : String,
  "[SageMakerImageArn](#cfn-sagemaker-app-resourcespec-sagemakerimagearn)" : String,
  "[SageMakerImageVersionArn](#cfn-sagemaker-app-resourcespec-sagemakerimageversionarn)" : String
}
```

### YAML
<a name="aws-properties-sagemaker-app-resourcespec-syntax.yaml"></a>

```
  [InstanceType](#cfn-sagemaker-app-resourcespec-instancetype): String
  [LifecycleConfigArn](#cfn-sagemaker-app-resourcespec-lifecycleconfigarn): String
  [SageMakerImageArn](#cfn-sagemaker-app-resourcespec-sagemakerimagearn): String
  [SageMakerImageVersionArn](#cfn-sagemaker-app-resourcespec-sagemakerimageversionarn): String
```

## Properties
<a name="aws-properties-sagemaker-app-resourcespec-properties"></a>

`InstanceType`  <a name="cfn-sagemaker-app-resourcespec-instancetype"></a>
The instance type that the image version runs on.  
**JupyterServer apps** only support the `system` value.  
For **KernelGateway apps**, the `system` value is translated to `ml.t3.medium`. KernelGateway apps also support all other values for available instance types.
*Required*: No  
*Type*: String  
*Allowed values*: `system | ml.t3.micro | ml.t3.small | ml.t3.medium | ml.t3.large | ml.t3.xlarge | ml.t3.2xlarge | ml.m5.large | ml.m5.xlarge | ml.m5.2xlarge | ml.m5.4xlarge | ml.m5.8xlarge | ml.m5.12xlarge | ml.m5.16xlarge | ml.m5.24xlarge | ml.m5d.large | ml.m5d.xlarge | ml.m5d.2xlarge | ml.m5d.4xlarge | ml.m5d.8xlarge | ml.m5d.12xlarge | ml.m5d.16xlarge | ml.m5d.24xlarge | ml.c5.large | ml.c5.xlarge | ml.c5.2xlarge | ml.c5.4xlarge | ml.c5.9xlarge | ml.c5.12xlarge | ml.c5.18xlarge | ml.c5.24xlarge | ml.p3.2xlarge | ml.p3.8xlarge | ml.p3.16xlarge | ml.p3dn.24xlarge | ml.g4dn.xlarge | ml.g4dn.2xlarge | ml.g4dn.4xlarge | ml.g4dn.8xlarge | ml.g4dn.12xlarge | ml.g4dn.16xlarge | ml.r5.large | ml.r5.xlarge | ml.r5.2xlarge | ml.r5.4xlarge | ml.r5.8xlarge | ml.r5.12xlarge | ml.r5.16xlarge | ml.r5.24xlarge | ml.g5.xlarge | ml.g5.2xlarge | ml.g5.4xlarge | ml.g5.8xlarge | ml.g5.12xlarge | ml.g5.16xlarge | ml.g5.24xlarge | ml.g5.48xlarge | ml.g6.xlarge | ml.g6.2xlarge | ml.g6.4xlarge | ml.g6.8xlarge | ml.g6.12xlarge | ml.g6.16xlarge | ml.g6.24xlarge | ml.g6.48xlarge | ml.g6e.xlarge | ml.g6e.2xlarge | ml.g6e.4xlarge | ml.g6e.8xlarge | ml.g6e.12xlarge | ml.g6e.16xlarge | ml.g6e.24xlarge | ml.g6e.48xlarge | ml.geospatial.interactive | ml.p4d.24xlarge | ml.p4de.24xlarge | ml.trn1.2xlarge | ml.trn1.32xlarge | ml.trn1n.32xlarge | ml.p5.48xlarge | ml.p5e.48xlarge | ml.p5en.48xlarge | ml.m6i.large | ml.m6i.xlarge | ml.m6i.2xlarge | ml.m6i.4xlarge | ml.m6i.8xlarge | ml.m6i.12xlarge | ml.m6i.16xlarge | ml.m6i.24xlarge | ml.m6i.32xlarge | ml.m7i.large | ml.m7i.xlarge | ml.m7i.2xlarge | ml.m7i.4xlarge | ml.m7i.8xlarge | ml.m7i.12xlarge | ml.m7i.16xlarge | ml.m7i.24xlarge | ml.m7i.48xlarge | ml.c6i.large | ml.c6i.xlarge | ml.c6i.2xlarge | ml.c6i.4xlarge | ml.c6i.8xlarge | ml.c6i.12xlarge | ml.c6i.16xlarge | ml.c6i.24xlarge | ml.c6i.32xlarge | ml.c7i.large | ml.c7i.xlarge | ml.c7i.2xlarge | ml.c7i.4xlarge | ml.c7i.8xlarge | ml.c7i.12xlarge | ml.c7i.16xlarge | ml.c7i.24xlarge | ml.c7i.48xlarge | ml.r6i.large | ml.r6i.xlarge | ml.r6i.2xlarge | ml.r6i.4xlarge | ml.r6i.8xlarge | ml.r6i.12xlarge | ml.r6i.16xlarge | ml.r6i.24xlarge | ml.r6i.32xlarge | ml.r7i.large | ml.r7i.xlarge | ml.r7i.2xlarge | ml.r7i.4xlarge | ml.r7i.8xlarge | ml.r7i.12xlarge | ml.r7i.16xlarge | ml.r7i.24xlarge | ml.r7i.48xlarge | ml.m6id.large | ml.m6id.xlarge | ml.m6id.2xlarge | ml.m6id.4xlarge | ml.m6id.8xlarge | ml.m6id.12xlarge | ml.m6id.16xlarge | ml.m6id.24xlarge | ml.m6id.32xlarge | ml.c6id.large | ml.c6id.xlarge | ml.c6id.2xlarge | ml.c6id.4xlarge | ml.c6id.8xlarge | ml.c6id.12xlarge | ml.c6id.16xlarge | ml.c6id.24xlarge | ml.c6id.32xlarge | ml.r6id.large | ml.r6id.xlarge | ml.r6id.2xlarge | ml.r6id.4xlarge | ml.r6id.8xlarge | ml.r6id.12xlarge | ml.r6id.16xlarge | ml.r6id.24xlarge | ml.r6id.32xlarge`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LifecycleConfigArn`  <a name="cfn-sagemaker-app-resourcespec-lifecycleconfigarn"></a>
 The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.  
*Required*: No  
*Type*: String  
*Pattern*: `^(arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:studio-lifecycle-config/.*|None)$`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerImageArn`  <a name="cfn-sagemaker-app-resourcespec-sagemakerimagearn"></a>
The ARN of the SageMaker AI image that the image version belongs to.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:aws(-[\w]+)*:sagemaker:.+:[0-9]{12}:image/[a-z0-9]([-.]?[a-z0-9])*$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerImageVersionArn`  <a name="cfn-sagemaker-app-resourcespec-sagemakerimageversionarn"></a>
The ARN of the image version created on the instance. To clear the value set for `SageMakerImageVersionArn`, pass `None` as the value.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:aws(-[\w]+)*:sagemaker:.+:[0-9]{12}:image-version/[a-z0-9]([-.]?[a-z0-9])*/[0-9]+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::SageMaker::App Tag
<a name="aws-properties-sagemaker-app-tag"></a>

A tag object that consists of a key and an optional value, used to manage metadata for SageMaker AWS resources.

You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see [AddTags](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html).

For more information on adding metadata to your AWS resources with tagging, see [Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For advice on best practices for managing AWS resources with tagging, see [Tagging Best Practices: Implement an Effective AWS Resource Tagging Strategy](https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf).

## Syntax
<a name="aws-properties-sagemaker-app-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-sagemaker-app-tag-syntax.json"></a>

```
{
  "[Key](#cfn-sagemaker-app-tag-key)" : String,
  "[Value](#cfn-sagemaker-app-tag-value)" : String
}
```

### YAML
<a name="aws-properties-sagemaker-app-tag-syntax.yaml"></a>

```
  [Key](#cfn-sagemaker-app-tag-key): String
  [Value](#cfn-sagemaker-app-tag-value): String
```

## Properties
<a name="aws-properties-sagemaker-app-tag-properties"></a>

`Key`  <a name="cfn-sagemaker-app-tag-key"></a>
The tag key. Tag keys must be unique per resource.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-sagemaker-app-tag-value"></a>
The tag value.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)