Ariel Catala Valencia
Ariel Catala Valencia

Reputation: 112

CDK: aws_cdk.aws_ecs.EcrImage vs aws_cdk.aws_ecs.ContainerImage

What is the difference between using aws_cdk.aws_ecs.EcrImage and aws_cdk.aws_ecs.ContainerImage to create instances using CDK?

Upvotes: 0

Views: 373

Answers (1)

fedonev
fedonev

Reputation: 25669

Not much. ecs.EcrImage specifically represents an Amazon ECR Registry image. It extends ecs.ContainerImage construct, adding only an imageName property.

ContainerImage has static methods to return non-ECR (e.g. DockerHub) images. Perhaps confusingly, EcrImage inherits these factory methods as well.

Upvotes: 1

Related Questions