You did set up an AWS EC2 VM, installed Docker, and set up a repository in AWS ECR (Container Registry).
You got the permissions for listing and creating credentials for use on the AWS CLI.
You finished setting up your AWS CLI to be able to log in. And you executed the Command you saw in the documentation of AWS to login docker to be able to push your image.