Enable ECR image scanning on push for all the existing ECR repositories
Say that you want to start using ECR image scanning and you want to enable scanonPush for all the existing repositories .. Below AWC cli command will do just that ! aws ecr describe-repositories |grep REPOSITORIES|awk -F" " '{print $6}' | while read line; do aws ecr put-image-scanning-configuration --repository-name $line --image-scanning-configuration scanOnPush=true ; done