diff --git a/modules/sagemaker/sagemaker-templates-service-catalog/README.md b/modules/sagemaker/sagemaker-templates-service-catalog/README.md index 9d3d19e6..03e4419a 100644 --- a/modules/sagemaker/sagemaker-templates-service-catalog/README.md +++ b/modules/sagemaker/sagemaker-templates-service-catalog/README.md @@ -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. diff --git a/modules/sagemaker/sagemaker-templates-service-catalog/tests/test_stack.py b/modules/sagemaker/sagemaker-templates-service-catalog/tests/test_stack.py index f7faca76..26ff261f 100644 --- a/modules/sagemaker/sagemaker-templates-service-catalog/tests/test_stack.py +++ b/modules/sagemaker/sagemaker-templates-service-catalog/tests/test_stack.py @@ -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(