This module creates organizational SageMaker Project Templates.
The templates are registered in Service Catalog and available via SageMaker Studio Classic.
The module contains ogranizational SageMaker Project Templates vended as Service Catalog Products. Using the templates is available through SageMaker Studio Classic and AWS Service Catalog.
The template contains an example SageMaker Pipeline to train a model on Abalone dataset using XGBoost, and perform model evaluation.
The template is based on LLM fine-tuning template from AWS Enterprise MLOps Framework.
The template is based on basic multi-account template from AWS Enterprise MLOps Framework.
This project template contains SageMaker pipeline that performs batch inference.
This project template contains SageMaker pipeline that imports a hugging face model based on model id and access token inputs.
The template contains an example CI/CD pipeline to deploy the model endpoints to multiple AWS accounts.
The template is based on basic multi-account template from AWS Enterprise MLOps Framework.
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
.
- 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.
- 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 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 in order to create connection with GitHub.
portfolio-access-role-arn
- the ARN of the IAM Role used to access the Service Catalog Portfolio or SageMaker projects
repository-type
- type of repository to be integrated with Sagemaker template source code, exp.GitHub
. IfCodeCommit
is provided then other GitHub repository params are ignored. This is optional parameter, if not providedCodeCommit
is set as defaultrepository-owner
- owner or organisation of project code repositoryaccess-token-secret-name
- AWS Secret Manager secret name where access token is stored, this is used to manage repository from templateaws-codeconnection-arn
- AWS CodeConnection ARN for repository provider, currently template supports GitHub providerportfolio-name
- name of the Service Catalog Portfolioportfolio-owner
- owner of the Service Catalog Portfoliodev-vpc-id
- id of VPC in dev environmentdev-subnet-ids
- list of subnet idsdev-security-group-ids
- list of security group idspre-prod-account-id
- pre-prod account idpre-prod-region
- pre-prod regionpre-prod-vpc-id
- id of VPC in pre-prod environmentpre-prod-subnet-ids
- list of subnet idspre-prod-security-group-ids
- list of security group idsprod-account-id
- prod account idprod-region
- prod regionprod-vpc-id
- id of VPC in prod environmentprod-subnet-ids
- list of subnet idsprod-security-group-ids
- list of security group idssagemaker-domain-id
: SageMaker domain idsagemaker-domain-arn
: SageMaker domain ARN. Used to tag resources with thedomain-arn
, which is used for domain resource isolation. If domain resource isolation is enabledsagemaker-domain-arn
must be provided to ensure correct access to resources within the domain
name: templates
path: modules/sagemaker/sagemaker-templates
targetAccount: primary
parameters:
- name: portfolio-access-role-arn
valueFrom:
moduleMetadata:
group: sagemaker-studio
name: studio
key: LeadDataScientistRoleArn
# Below are the optional properties passed to the multi-account CI/CD deployment template
- name: dev-account-id
valueFrom:
envVariable: PRIMARY_ACCOUNT
- name: dev-region
valueFrom:
envVariable: PRIMARY_REGION
- name: dev-vpc-id
valueFrom:
moduleMetadata:
group: networking
name: networking
key: VpcId
- name: dev-subnet-ids
valueFrom:
moduleMetadata:
group: networking
name: networking
key: PrivateSubnetIds
- name: pre-prod-account-id
valueFrom:
envVariable: PRE_PROD_ACCOUNT
- name: pre-prod-region
valueFrom:
envVariable: PRE_PROD_REGION
- name: pre-prod-vpc-id
valueFrom:
moduleMetadata:
group: networking
name: networking-pre-prod
key: VpcId
- name: pre-prod-subnet-ids
valueFrom:
moduleMetadata:
group: networking
name: networking-pre-prod
key: PrivateSubnetIds
- name: prod-account-id
valueFrom:
envVariable: PROD_ACCOUNT
- name: prod-region
valueFrom:
envVariable: PROD_REGION
- name: prod-vpc-id
valueFrom:
moduleMetadata:
group: networking
name: networking-prod
key: VpcId
- name: prod-subnet-ids
valueFrom:
moduleMetadata:
group: networking
name: networking-prod
key: PrivateSubnetIds
- name: sagemaker-domain-id
valueFrom:
moduleMetadata:
group: sagemaker-studio
name: studio
key: StudioDomainId
- name: sagemaker-domain-arn
valueFrom:
moduleMetadata:
group: sagemaker-studio
name: studio
key: StudioDomainArn
sagemaker-templates-modules-github.yaml sagemaker-templates-modules-codecommit.yaml
ServiceCatalogPortfolioName
- the name of the Service Catalog PortfolioServiceCatalogPortfolioOwner
- the owner of the Service Catalog Portfolio
{
"ServiceCatalogPortfolioName": "MLOps SageMaker Project Templates",
"ServiceCatalogPortfolioOwner": "administrator"
}