Use Git credentials (static user name and password) or SSH keys (public and private key pairs) in AWS Identity and Access Management (IAM) for authentication with CodeCommit repositories.
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html