Skip to content

Commit

Permalink
Updated README with prerequesites information and updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acbhatt12 committed Oct 17, 2024
1 parent 8d8f27b commit 3b4c27c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 7 additions & 3 deletions modules/sagemaker/sagemaker-templates-service-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ The template contains an example CI/CD pipeline to deploy the model endpoints to

The template is based on basic multi-account template from [AWS Enterprise MLOps Framework](https://github.com/aws-samples/aws-enterprise-mlops-framework/blob/main/mlops-multi-account-cdk/mlops-sm-project-template/README.md#sagemaker-project-stack).

As part for third party code repository (like GitHub) integration, SageMaker templates will be able to manage (create, delete) repositories. As an example, if sagemaker-templates-service-catalog module model_deploy is used then it would create code repository with directly into owner account provided into configuration. Repository will be named after SageMaker project name in AWS account `{sagemaker-project}-deploy`. For example, if SageMaker project name is `aiops-abalone-model` then GitHub repository would be created with name `aiops-abalone-model-deploy`.
#### Third-party Code Repository Integration
SageMaker templates support third party code repository (GitHub) integration along with default AWS CodeCommit. As part of integration, SageMaker templates will be able to manage (create, delete) repositories. As an example, if `sagemaker-templates-service-catalog` template configured to use GitHub as repository type then it would create code repository directly into GitHub account provided with manifest configuration. Repository will be named after SageMaker project name in AWS account `{sagemaker-project}-deploy`. For example, if SageMaker project name is `aiops-abalone-model` then GitHub repository would be created with name `aiops-abalone-model-deploy`.

> [!IMPORTANT]
> It is important to note AWS CodeCommit is no longer available to new customers. Existing customers of AWS CodeCommit can continue to use the service as normal.

## Prerequesites:
### AWS CodeCommit repository integration
- There isn't any prerequesite for using CodeCommit repository with SageMaker templates. It is supported as default repository.
> [!IMPORTANT]
> It is important to note AWS CodeCommit is no longer available to new customers. Existing customers of AWS CodeCommit can continue to use the service as normal.
### GitHub repository integration
- Target AWS account should contain AWS Secret Manager secret that contains GitHub personal access token with required permissions to manage repository. Refer guide [Creating a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) in order to create access token.
- Template also requires AWS CodeConnection created for GitHub provider in order to integrated GitHub repositories AWS CodeBuild and AWS CodePipeline. Refer guide [Create a connection to GitHub](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html) in order to create connection with GitHub.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ def stack(stack_defaults) -> cdk.Stack:
sagemaker_domain_id = "domain_id"
sagemaker_domain_arn = f"arn:aws:sagemaker:::domain/{sagemaker_domain_id}"
repository_type = RepositoryType.CODECOMMIT
access_token_secret_name = ("github_token",)
aws_codeconnection_arn = (
"arn:aws:codeconnections:xxxxxx:xxxxxxxxxxxx:connection/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
)
access_token_secret_name = "github_token"
aws_codeconnection_arn = "arn:aws:codeconnections:xxxxxx:xxxxxxxxxxxx:connection/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
repository_owner = "github-test-owner"

return stack.ServiceCatalogStack(
Expand Down

0 comments on commit 3b4c27c

Please sign in to comment.