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
For me the root cause of getting the error was that no matter which version of git I was using on OSX, GIT was always picking up the credential.helper config of using osxkeychain from the file:
/Applications/Xcode.app/Contents/Developer/usr/share/git-core/gitconfig
Getting rid of this solved the problem for me and has not broken anything.