get-login is deprecated. Use get-login-password instead.
You must pass a token from aws ecr get-login-password to the docker login.
For example:
aws ecr get-login-password --region "${REGION}" | docker login --username AWS --password-stdin ${ECR_REGISTRY}