aws / aws/aws-cdk

aws-cdk-lib/aws-sagemaker: CfnApp #/AppType: CodeEditor is not a valid enum value

Open
#34,223 1 comment 0 reactions 0 assignees View on GitHub
bug needs-cfn p3 package/tools
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

I noted that in the CloudFormation documentation, 'CodeEditor' is not a valid type for AppType: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-app.html#cfn-sagemaker-app-apptype. However, when I look up existing apps for my domain with AWS CLI (configured with click-ops), it does return my app with AppType 'CodeEditor'.

```
{
"Apps": [
{
"DomainId": "d-u0oecosdfsf",
"SpaceName": "code-editor-mike",
"AppType": "CodeEditor",
"AppName": "default",
"Status": "InService",
"CreationTime": "2025-04-22T07:24:35.004000+12:00",
"ResourceSpec": {
"SageMakerImageArn": "arn:aws:sagemaker:us-east-1:885854791233:image/sagemaker-distribution-cpu",
"SageMakerImageVersionAlias": "2.4.1",
"InstanceType": "ml.t3.medium"
}
}
]
}
```

When I declare this app via CDK, it throws an error.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

I expect CodeEditor to be a valid enum type, and CDK to create the app.

### Current Behavior

```
_ToolkitError: The stack named dev-sagemaker-ai-stack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Properties validation failed for resource SagemakerCodeEditorApp with message:
[#/AppType: CodeEditor is not a valid enum value]
```

### Reproduction Steps

Deploy the following with CDK:

```ts
const domain: CfnDomain;
const userProfile: CfnUserProfile;

new CfnApp(this, 'SagemakerCodeEditorApp', {
appName: 'CodeEditor',
domainId: domain.attrDomainId,
userProfileName: userProfile.userProfileName,
appType: 'CodeEditor',
resourceSpec: {
instanceType: 'ml.t3.medium',
sageMakerImageArn: `arn:aws:sagemaker:us-east-1:885854791233:image/sagemaker-distribution-cpu`,
},
});
```

### Possible Solution

Add CodeEditor to possible types of the AppType enum.

### Additional Information/Context

_No response_

### CDK CLI Version

2.1007.0

### Framework Version

_No response_

### Node.js Version

v22.10.0

### OS

macOS Sequioa Version 15.3.2 (24D81)

### Language

TypeScript

### Language Version

5.6.3

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the CfnApp definition and its AppType enum, then compare the accepted values with the CloudFormation and AWS CLI behavior described in the issue. Add CodeEditor to the valid enum values and verify that the reproduced TypeScript declaration can deploy successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.