How to Create an AWS ECR Repository in AWS CLI


If you need to create an Elastic Container Registry (ECR) Repository from the AWS CLI, you can do the following:

aws ecr create-repository \
--repository-name <repo-name> \
--image-scanning-configuration scanOnPush=true \
--region ${AWS_REGION}