-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ded8eed
commit 526bca1
Showing
11 changed files
with
178 additions
and
225 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# API and Testing infrastructure Configuration | ||
|
||
The API and Testing infrastructure stack reads configuration from context values in `cdk.json`. These values can also be override by passing arguments to the cdk deploy command eg: | ||
|
||
``` | ||
cdk deploy ab-testing-api -c stage_name=dev -c endpoint_prefix=sagemaker-ab-testing-pipeline | ||
``` | ||
|
||
Following is a list of the context parameters and their defaults. | ||
|
||
| Property | Description | Default | | ||
|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| | ||
| `api_name` | The API Gateway Name | "ab-testing" | | ||
| `stage_name` | The stage namespace for resource and API Gateway path | "dev" | | ||
| `endpoint_prefix` | A prefix to filter Amazon SageMaker endpoints the API can invoke. | "sagemaker-" | | ||
| `api_lambda_memory` | The [lambda memory](https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html) allocation for API endpoint. | 768 | | ||
| `api_lambda_timeout` | The lambda timeout for the API endpoint. | 10 | | ||
| `metrics_lambda_memory` | The [lambda memory](https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html) allocated for metrics processing Lambda | 768 | | ||
| `metrics_lambda_timeout` | The lambda timeout for the processing lambda. | 10 | | ||
| `dynamodb_read_capacity` | The [Read Capacity](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html) for the DynamoDB tables | 5 | | ||
| `dynamodb_write_capacity` | The [Write Capacity](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html) for the DynamoDB tables | 5 | | ||
| `delivery_sync` | When`true` metrics will be written directly to DynamoDB, instead of the Amazon Kinesis for processing. | false | | ||
| `firehose_interval` | The [buffering](https://docs.aws.amazon.com/firehose/latest/dev/create-configure.html) interval in seconds which firehose will flush events to S3. | 60 | | ||
| `firehose_mb_size` | The buffering size in MB before the firehose will flush its events to S3. | 1 | | ||
| `log_level` | Logging level for AWS Lambda functions | "INFO" | |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
# Customize the Deployment Pipeline | ||
|
||
The [ab-testing-pipeline.yml](../ab-testing-pipeline.yml) is included as part of this distribution, and doesn't require updating unless you change the `infra/pipeline_stack.py` implementation. | ||
|
||
To generate a new pipeline you can run the following command. | ||
|
||
``` | ||
cdk synth ab-testing-pipeline --path-metadata=false > ab-testing-pipeline.yml | ||
``` | ||
|
||
This template will output a new Policy to attach to the `AmazonSageMakerServiceCatalogProductsUseRole` service role. This policy is not required as this managed role already has these permissions. In order for this to run within Amazon SageMaker Studio, you will need to remove this policy. I recommend you diff the original to see where changes need to be made. If there are additional roles or policies the project might not be validate when used inside of Amazon SageMaker Studio. | ||
|
||
``` | ||
git diff ab-testing-pipeline.yml | ||
``` |
File renamed without changes.
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,42 @@ | ||
# AWS Service Catalog Provisioning | ||
|
||
If you have an existing AWS Service Catalog Portfolio, or would like to create the Product manually, follow these steps: | ||
|
||
1. Sign in to the console with the data science account. | ||
2. On the AWS Service Catalog console, under **Administration**, choose **Portfolios**. | ||
3. Choose **Create a new portfolio**. | ||
4. Name the portfolio `SageMaker Organization Templates`. | ||
5. Download the [AB testing template](../ab-testing-pipeline.yml) to your computer. | ||
6. Choose the new portfolio. | ||
7. Choose **Upload a new product.** | ||
8. For **Product name**¸ enter `A/B Testing Deployment Pipeline`. | ||
9. For **Description**, enter `Amazon SageMaker Project for A/B Testing models`. | ||
10. For **Owner**, enter your name. | ||
11. Under **Version details**, for **Method**, choose **Use a template file**. | ||
12. Choose **Upload a template**. | ||
13. Upload the template you downloaded. | ||
14. For **Version title**, enter `1.0`. | ||
|
||
The remaining parameters are optional. | ||
|
||
15. Choose **Review**. | ||
16. Review your settings and choose **Create product**. | ||
17. Choose **Refresh** to list the new product. | ||
18. Choose the product you just created. | ||
19. On the **Tags** tab, add the following tag to the product: | ||
- **Key** – `sagemaker:studio-visibility` | ||
- **Value** – `True` | ||
|
||
Finally we need to add launch constraint and role permissions. | ||
|
||
20. On the **Constraints** tab, choose Create constraint. | ||
21. For **Product**, choose **AB Testing Pipeline** (the product you just created). | ||
22. For **Constraint type**, choose **Launch**. | ||
23. Under **Launch Constraint**, for **Method**, choose **Select IAM role**. | ||
24. Choose **AmazonSageMakerServiceCatalogProductsLaunchRole**. | ||
25. Choose **Create**. | ||
26. On the **Groups, roles, and users** tab, choose **Add groups, roles, users**. | ||
27. On the **Roles** tab, select the role you used when configuring your SageMaker Studio domain. | ||
28. Choose **Add access**. | ||
|
||
If you don’t remember which role you selected, in your data science account, go to the SageMaker console and choose **Amazon SageMaker Studio**. In the Studio **Summary** section, locate the attribute **Execution role**. Search for the name of this role in the previous step. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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