When trying to create a commit using boto3's codecommit client, somehow I got AttributeError
on create_commit
, but other commands works as expected.
Here is the code I'm using:
client = boto3.client(
'codecommit',
aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
)
resp = client.create_commit(
repositoryName='my_repo',
branchName='master',
authorName='My Name',
email='my_email@gmail.com',
putFiles=[
{
'filePath': '1.json',
'fileMode': 'NORMAL',
'fileContent': '%s' % (content, ),
}
]
)
Repository is an empty so parentCommitId
is not required.
And it says:
AttributeError: 'CodeCommit' object has no attribute 'create_commit'
Does anyone face this kind of issue?