You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Both methods achieve the same outcome. Use the AWS CLI for automation or scripting and the AWS Management Console for a more guided experience.
81
+
- Ensure you have sufficient IAM permissions to create resources via CloudFormation (e.g., `iam:CreateRole`, `cloudformation:CreateStack`).
82
+
- For additional details on AWS CLI commands, refer to the [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/).
83
+
84
+
---
85
+
86
+
## 2: Provision the SageMaker Notebook Instance
87
+
88
+
### Steps
89
+
90
+
1. **Log in to the AWS Management Console**:
91
+
- Navigate to [AWS SageMaker](https://console.aws.amazon.com/sagemaker/).
92
+
93
+
2. **Open the Notebook Instances Page**:
94
+
- From the SageMaker dashboard, select **Notebook instances** in the left-hand menu.
95
+
96
+
3. **Create a New Notebook Instance**:
97
+
- Click the **Create notebook instance** button at the top of the page.
98
+
99
+
4. **Configure the Notebook Instance**:
100
+
- **Notebook instance name**: Enter a unique name (e.g., `osml-notebook`).
101
+
- **Instance type**: Choose an instance type based on your workload (e.g., `ml.t3.medium` for lightweight tasks or `ml.p3.2xlarge` for GPU-based tasks).
102
+
- **IAM role**:
103
+
- Select the role provisioned using the CloudFormation stack (e.g., `OSMLOpsRole`).
104
+
- **Volume size**: Set the storage size (default: 5 GB or more, based on your requirements).
105
+
106
+
5. **Review and Create**:
107
+
- Click **Create notebook instance**.
108
+
- Wait for the instance status to transition to **InService**.
109
+
110
+
---
111
+
112
+
## 3: Bootstrap the Notebook Instance
113
+
114
+
### Steps
115
+
116
+
1. **Clone the Repository**:
117
+
- Open a terminal in the SageMaker Notebook instance and clone the repository containing the bootstrap script:
The `cdk.context.json` file allows you to specify configuration parameters for various components of your application.
12
149
Below is an example configuration where we demonstrate renaming the model runner cluster, specifying a custom role to
@@ -40,7 +177,7 @@ import for the model runner ECS task role, specifying a VPC to import, and which
40
177
}
41
178
```
42
179
43
-
### Configuration Parameters
180
+
#### Configuration Parameters
44
181
45
182
- `projectName`: The name of the project - this will be used to tag stack names.
46
183
- `account`: AWS account configuration.
@@ -53,14 +190,14 @@ import for the model runner ECS task role, specifying a VPC to import, and which
53
190
- `buildFromSource`: Whether to build the component from source.
54
191
- `config`: Each component has a configuration class that be used to customize its CDK resources.
55
192
56
-
## Understanding the Configuration Parser
193
+
### Understanding the Configuration Parser
57
194
58
195
The `ConfigParser` class reads the configuration from the `cdk.context.json` file and makes it available for use in
59
196
your CDK stacks. Ensure your `config-parser.ts` includes the necessary structure to read these configurations.
60
197
You do not need to implement this as a customer but a breakdown of how it works is provided her for your understanding;
61
198
incase further customization is required.
62
199
63
-
### Example `config-parser.ts`
200
+
#### Example `config-parser.ts`
64
201
65
202
```typescript
66
203
import { App } from "aws-cdk-lib";
@@ -100,11 +237,11 @@ export class AppConfig {
100
237
export const appConfig = new AppConfig(new App());
101
238
```
102
239
103
-
## Using the Configuration in Your CDK Stacks
240
+
### Using the Configuration in Your CDK Stacks
104
241
105
242
You can now use the `ConfigParser` to configure your VPC and other components based on the settings provided in the `cdk.context.json` file. Here is an example of how to use it in a CDK stack.
106
243
107
-
### Example VPC Stack
244
+
#### Example VPC Stack
108
245
109
246
```typescript
110
247
import { App, Stack, StackProps } from 'aws-cdk-lib';
@@ -127,11 +264,11 @@ export class MyVpcStack extends Stack {
127
264
}
128
265
```
129
266
130
-
## Custom Model Deployment Configuration Instructions
267
+
### Custom Model Deployment Configuration Instructions
131
268
132
269
Follow the steps below to configure and deploy your custom model using the provided configuration classes and AWS CDK constructs.
133
270
134
-
### Update the `cdk.context.json` File
271
+
#### Update the `cdk.context.json` File
135
272
136
273
Your `cdk.context.json` file contains the configuration details required for deploying your custom model.
137
274
You need to update this file with your specific configuration values. When configuring your custom model deployment,
@@ -175,13 +312,13 @@ containers from source for more specialized needs. Below is an example of how to
175
312
```
176
313
177
314
178
-
## Enabling Authentication
315
+
### Enabling Authentication
179
316
180
317
Currently, there are two services that supports authentication
181
318
- Tile Sever
182
319
- Data Catalog
183
320
184
-
### Prerequisites
321
+
#### Prerequisites
185
322
186
323
Before enabling authentication, you will need the following:
187
324
- OIDC Authentication Server
@@ -198,7 +335,7 @@ Before enabling authentication, you will need the following:
198
335
}
199
336
```
200
337
201
-
1. To validate:
338
+
2. To validate:
202
339
- Upon successful deployment, go to your AWS Account -> API-GW -> find `<service>Dataplane` (ie: `TSDataplane`) stack > `Outputs` tab, you will see an output similar to:
By following this guide, you can easily configure various components of your application using the `cdk.context.json` file. This approach centralizes your configuration, making it easier to manage and update settings for your application.
352
+
By following this guide, you can easily configure various components of your application using the `cdk.context.json` file.
353
+
This approach centralizes your configuration, making it easier to manage and update settings for your application.
215
354
216
355
For more details on the available configurations and options, refer to the documentation provided by the `osml-cdk-constructs` package.
356
+
357
+
## Notes
358
+
- Remember to stop or delete the notebook instance when not in use to avoid unnecessary charges.
0 commit comments