AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

Repository

Provides a CodeCommit Repository.

Import

import { Repository } from 'aws-cdk-lib/aws-codecommit';

Or use the module namespace:

import * as codecommit from 'aws-cdk-lib/aws-codecommit';
// codecommit.Repository

Properties

Configuration passed to the constructor as RepositoryProps.

repositoryNameRequired
string

Name of the repository. This property is required for all CodeCommit repositories.

codeOptional
Code

The contents with which to initialize the repository after it has been created.

Default: - No initialization (create empty repo)

descriptionOptional
string

A description of the repository. Use the description to identify the purpose of the repository.

Default: - No description.

kmsKeyOptional
IKeyRef

The customer managed key used to encrypt and decrypt the data in repository.

Default: - Use an AWS managed key

Learn AWS the Practical Way

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

Subscribe to Newsletter