diff --git a/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts b/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts index 8a48d1bbde767..c6e4423b06b6d 100644 --- a/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts +++ b/packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts @@ -26,9 +26,12 @@ export interface ContainerImageConfig { export abstract class ContainerImage { /** * Reference an image in an ECR repository + * + * @param repository ECR repository + * @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`) */ - public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest'): ContainerImage { - return new EcrImage(repository, tag); + public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest'): ContainerImage { + return new EcrImage(repository, tagOrDigest); } /** diff --git a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts index 7ba6d6bf320d7..893a8f764180e 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts @@ -18,9 +18,12 @@ export abstract class ContainerImage { /** * Reference an image in an ECR repository + * + * @param repository ECR repository + * @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`) */ - public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest') { - return new EcrImage(repository, tag); + public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest') { + return new EcrImage(repository, tagOrDigest); } /**