AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::SageMaker::CodeRepository

CfnCodeRepository

Creates a Git repository as a resource in your SageMaker AI account. You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your SageMaker AI account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with. The repository can be hosted either in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository.

Import

import { CfnCodeRepository } from 'aws-cdk-lib/aws-sagemaker';

Or use the module namespace:

import * as sagemaker from 'aws-cdk-lib/aws-sagemaker';
// sagemaker.CfnCodeRepository

Properties

Configuration passed to the constructor as CfnCodeRepositoryProps.

gitConfigRequired
IResolvable | GitConfigProperty

Configuration details for the Git repository, including the URL where it is located and the ARN of the AWS Secrets Manager secret that contains the credentials used to access the repository.

codeRepositoryNameOptional
string

The name of the Git repository.

tagsOptional
CfnTag[]

List of tags for Code Repository.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter