To register in ECR, first you need to know the password for login using this command:
aws ecr get-login-password --profile name | docker login --username AWS --password-stdin <url>
aws ecr get-login --registry-ids <id> --no-include-email --profile name