-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SageMaker Domain, UserProfile, App and AppImageConfig resources (#7)
- add AWS::SageMaker::Domain CloudFormation resource type - add AWS::SageMaker::UserProfile CloudFormation resource type - add AWS::SageMaker::App CloudFormation resource type - add AWS::SageMaker::AppImageConfig CloudFormation resource type - update repo README to reflect new resource types
- Loading branch information
1 parent
9fffad0
commit 4b05df4
Showing
127 changed files
with
12,152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"typeName": "AWS::SageMaker::App", | ||
"language": "java", | ||
"runtime": "java8", | ||
"entrypoint": "software.amazon.sagemaker.app.HandlerWrapper::handleRequest", | ||
"testEntrypoint": "software.amazon.sagemaker.app.HandlerWrapper::testEntrypoint", | ||
"settings": { | ||
"namespace": [ | ||
"software", | ||
"amazon", | ||
"sagemaker", | ||
"app" | ||
], | ||
"codegen_template_path": "default", | ||
"protocolVersion": "2.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# AWS::SageMaker::App | ||
|
||
Congratulations on starting development! Next steps: | ||
|
||
1. Write the JSON schema describing your resource, `aws-sagemaker-app.json` | ||
1. Implement your resource handlers. | ||
|
||
The RPDK will automatically generate the correct resource model from the schema whenever the project is built via Maven. You can also do this manually with the following command: `cfn generate`. | ||
|
||
> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten. | ||
The code uses [Lombok](https://projectlombok.org/), and [you may have to install IDE integrations](https://projectlombok.org/setup/overview) to enable auto-complete for Lombok-annotated classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
{ | ||
"typeName": "AWS::SageMaker::App", | ||
"description": "Resource Type definition for AWS::SageMaker::App", | ||
"additionalProperties": false, | ||
"properties": { | ||
"AppArn": { | ||
"type": "string", | ||
"description": "The Amazon Resource Name (ARN) of the app.", | ||
"minLength": 1, | ||
"maxLength": 256, | ||
"pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:app/.*" | ||
}, | ||
"AppName": { | ||
"type": "string", | ||
"description": "The name of the app.", | ||
"minLength": 1, | ||
"maxLength": 63, | ||
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" | ||
}, | ||
"AppType": { | ||
"type": "string", | ||
"description": "The type of app.", | ||
"enum": [ | ||
"JupyterServer", | ||
"KernelGateway" | ||
] | ||
}, | ||
"DomainId": { | ||
"type": "string", | ||
"description": "The domain ID.", | ||
"minLength": 1, | ||
"maxLength": 63 | ||
}, | ||
"ResourceSpec": { | ||
"$ref": "#/definitions/ResourceSpec", | ||
"description": "The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance." | ||
}, | ||
"Tags": { | ||
"type": "array", | ||
"description": "A list of tags to apply to the app.", | ||
"uniqueItems": false, | ||
"minItems": 0, | ||
"maxItems": 50, | ||
"items": { | ||
"$ref": "#/definitions/Tag" | ||
} | ||
}, | ||
"UserProfileName": { | ||
"type": "string", | ||
"description": "The user profile name.", | ||
"minLength": 1, | ||
"maxLength": 63, | ||
"pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" | ||
} | ||
}, | ||
"definitions": { | ||
"ResourceSpec": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"InstanceType": { | ||
"type": "string", | ||
"description": "The instance type that the image version runs on.", | ||
"enum": [ | ||
"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.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.g4dn.xlarge", | ||
"ml.g4dn.2xlarge", | ||
"ml.g4dn.4xlarge", | ||
"ml.g4dn.8xlarge", | ||
"ml.g4dn.12xlarge", | ||
"ml.g4dn.16xlarge" | ||
] | ||
}, | ||
"SageMakerImageArn": { | ||
"type": "string", | ||
"description": "The ARN of the SageMaker image that the image version belongs to.", | ||
"minLength": 1, | ||
"maxLength": 256, | ||
"pattern": "^arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:image/[a-z0-9]([-.]?[a-z0-9])*$" | ||
}, | ||
"SageMakerImageVersionArn": { | ||
"type": "string", | ||
"description": "The ARN of the image version created on the instance.", | ||
"minLength": 1, | ||
"maxLength": 256, | ||
"pattern": "^arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:image-version/[a-z0-9]([-.]?[a-z0-9])*/[0-9]+$" | ||
} | ||
} | ||
}, | ||
"Tag": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"Value": { | ||
"type": "string", | ||
"minLength": 1, | ||
"maxLength": 128 | ||
}, | ||
"Key": { | ||
"type": "string", | ||
"minLength": 1, | ||
"maxLength": 128 | ||
} | ||
}, | ||
"required": [ | ||
"Key", | ||
"Value" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"AppName", | ||
"AppType", | ||
"DomainId", | ||
"UserProfileName" | ||
], | ||
"createOnlyProperties": [ | ||
"/properties/AppName", | ||
"/properties/AppType", | ||
"/properties/DomainId", | ||
"/properties/UserProfileName", | ||
"/properties/Tags" | ||
], | ||
"writeOnlyProperties": [ | ||
"/properties/Tags" | ||
], | ||
"primaryIdentifier": [ | ||
"/properties/AppName", | ||
"/properties/AppType", | ||
"/properties/DomainId", | ||
"/properties/UserProfileName" | ||
], | ||
"readOnlyProperties": [ | ||
"/properties/AppArn" | ||
], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"sagemaker:CreateApp", | ||
"sagemaker:DescribeApp" | ||
] | ||
}, | ||
"read": { | ||
"permissions": [ | ||
"sagemaker:DescribeApp" | ||
] | ||
}, | ||
"delete": { | ||
"permissions": [ | ||
"sagemaker:DeleteApp" | ||
] | ||
}, | ||
"list": { | ||
"permissions": [ | ||
"sagemaker:ListApps" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# AWS::SageMaker::App | ||
|
||
Resource Type definition for AWS::SageMaker::App | ||
|
||
## Syntax | ||
|
||
To declare this entity in your AWS CloudFormation template, use the following syntax: | ||
|
||
### JSON | ||
|
||
<pre> | ||
{ | ||
"Type" : "AWS::SageMaker::App", | ||
"Properties" : { | ||
"<a href="#appname" title="AppName">AppName</a>" : <i>String</i>, | ||
"<a href="#apptype" title="AppType">AppType</a>" : <i>String</i>, | ||
"<a href="#domainid" title="DomainId">DomainId</a>" : <i>String</i>, | ||
"<a href="#resourcespec" title="ResourceSpec">ResourceSpec</a>" : <i><a href="resourcespec.md">ResourceSpec</a></i>, | ||
"<a href="#tags" title="Tags">Tags</a>" : <i>[ <a href="tag.md">Tag</a>, ... ]</i>, | ||
"<a href="#userprofilename" title="UserProfileName">UserProfileName</a>" : <i>String</i> | ||
} | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
Type: AWS::SageMaker::App | ||
Properties: | ||
<a href="#appname" title="AppName">AppName</a>: <i>String</i> | ||
<a href="#apptype" title="AppType">AppType</a>: <i>String</i> | ||
<a href="#domainid" title="DomainId">DomainId</a>: <i>String</i> | ||
<a href="#resourcespec" title="ResourceSpec">ResourceSpec</a>: <i><a href="resourcespec.md">ResourceSpec</a></i> | ||
<a href="#tags" title="Tags">Tags</a>: <i> | ||
- <a href="tag.md">Tag</a></i> | ||
<a href="#userprofilename" title="UserProfileName">UserProfileName</a>: <i>String</i> | ||
</pre> | ||
|
||
## Properties | ||
|
||
#### AppName | ||
|
||
The name of the app. | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Minimum_: <code>1</code> | ||
|
||
_Maximum_: <code>63</code> | ||
|
||
_Pattern_: <code>^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### AppType | ||
|
||
The type of app. | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Allowed Values_: <code>JupyterServer</code> | <code>KernelGateway</code> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### DomainId | ||
|
||
The domain ID. | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Minimum_: <code>1</code> | ||
|
||
_Maximum_: <code>63</code> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### ResourceSpec | ||
|
||
_Required_: No | ||
|
||
_Type_: <a href="resourcespec.md">ResourceSpec</a> | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) | ||
|
||
#### Tags | ||
|
||
A list of tags to apply to the app. | ||
|
||
_Required_: No | ||
|
||
_Type_: List of <a href="tag.md">Tag</a> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### UserProfileName | ||
|
||
The user profile name. | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Minimum_: <code>1</code> | ||
|
||
_Maximum_: <code>63</code> | ||
|
||
_Pattern_: <code>^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
## Return Values | ||
|
||
### Fn::GetAtt | ||
|
||
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 [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). | ||
|
||
#### AppArn | ||
|
||
The Amazon Resource Name (ARN) of the app. | ||
|
Oops, something went wrong.