Answer – A and B
The AWS Documentation mentions the following.
HTTPS connections require either Git credentials, which IAM users can generate for themselves in IAM, or an AWS access key. Your repository users must configure in the credential helper included in the AWS CLI. But it is the only method available for root account or federated users. Git credentials are the easiest method for users of your repository to set up and use. SSH connections require your users to generate a public-private key pair, store the public key, associate the public key with their IAM user, configure their known hosts file on their local computer, and create and maintain a config file on their local computers. Because this is a more complex configuration process, we recommend you choose HTTPS and Git credentials for connections to AWS CodeCommit.
The easiest way to set up AWS CodeCommit is to configure HTTPS Git credentials for AWS CodeCommit. This HTTPS authentication method:
Uses a static user name and password.
Works with all operating systems supported by AWS CodeCommit.
Is also compatible with integrated development environments (IDEs) and other development tools that support Git credentials.
The simplest way to set up connections to AWS CodeCommit repositories is to configure Git credentials for AWS CodeCommit in the IAM console and then use those credentials for HTTPS connections.
For more information, please refer to the below URL-
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
Options C and D are incorrect because these are the least easy way to connect to the repository.
For more information on sharing a repository, please refer to the below URL-
https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-share-repository.html