Question: I want to create a backup of one of my Git repositories and save it to AWS CodeCommit. I don't want to include the use of my local machine. Can anyone tell me how can I do it directly or through AWS Lambda?

Answer: 
AWS Quickstart provide a [solution](https://github.com/aws-quickstart/quickstart-git2s3) that copies your repo to s3 using lambda and webhooks. 

This solution could quite easily be modified to copy to CodeCommit rather than s3.

[![enter image description here](https://i.stack.imgur.com/Tqmbz.png)](https://i.stack.imgur.com/Tqmbz.png)
It seems migrating directly from Github to AWS Code-commit is not available in the AWS documentation. The following links have some scripts that can do the migration using a local machine.

Please check:

<http://www.paul-kearney.com/2015/09/migrating-from-github-to-aws-codecommit.html>

<https://gist.github.com/paulkearney/6042561c56654a15af3c>