My local laptop is a Mac.
The ssh key is configured properly. This is the content of ~/.ssh/config
Host barthea Hostname git-codecommit.us-east
Whenever it asks to enter Username and Password while trying to clone or pull the code from AWS, instead of copying the password manually enter it by typing each letter. This resolved my problem.