-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcomprehend-experiment-notebook.yml
More file actions
56 lines (52 loc) · 1.72 KB
/
comprehend-experiment-notebook.yml
File metadata and controls
56 lines (52 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Easily create a comprehend experimentation notebook'
Resources:
SageMakerRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service: sagemaker.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonS3FullAccess
- arn:aws:iam::aws:policy/AmazonSageMakerFullAccess
- arn:aws:iam::aws:policy/ComprehendFullAccess
- arn:aws:iam::aws:policy/IAMFullAccess
SagemakerInstance:
Type: AWS::SageMaker::NotebookInstance
Properties:
InstanceType: ml.t3.2xlarge
DirectInternetAccess: Enabled
NotebookInstanceName: comprehend-experiment
VolumeSizeInGB: 5
DefaultCodeRepository: https://github.com/hervenivon/aws-experiments-comprehend-custom-classifier.git
RoleArn:
Fn::GetAtt:
- SageMakerRole
- Arn
LifecycleConfigName:
Fn::GetAtt:
- NotebookInstanceLifecycleConfig
- NotebookInstanceLifecycleConfigName
NotebookInstanceLifecycleConfig:
Type: AWS::SageMaker::NotebookInstanceLifecycleConfig
Properties:
NotebookInstanceLifecycleConfigName: comprehend-experiment-lifecycle-config
OnCreate:
- Content:
Fn::Base64:
'#!/bin/bash
echo "Custom OnCreate Lifecycle Config for future use"'
OnStart:
- Content:
Fn::Base64:
'#!/bin/bash
echo "Custom OnStart Lifecycle Config for future use"'
Outputs:
SagemakerNotebookInstanceARN:
Description: Sagemaker notebook instance arn
Value: !Ref SagemakerInstance