The AWS Cloud9 development environment comes with AWS managed temporary credentials that are associated with your IAM user. You use these credentials with the AWS git-remote-codecommit tool (A Git Remote Helper that makes it easier to interact with AWS CodeCommit). This tool is installed in Cloud9 by default. You can install it on your own machine by following the installation instructions.
aws codecommit create-repository \ --repository-name wild-rydes
git clone https://github.com/aws-samples/aws-serverless-webapp-workshop.git
sudo yum install git-subtree -y git subtree split -P resources/code/WildRydesVue -b WildRydesVue
Note: You may get the error message
git: 'subtree' is not a git command on Cloud9 and Amazon Linux 2. Run
sudo yum install git-subtree as a workaround, as this is not installed by default with
git in these environments.
mkdir ../wild-rydes && cd ../wild-rydes
git pull ../aws-serverless-webapp-workshop WildRydesVue
git remote add origin codecommit://wild-rydes
git push -u origin master
rm -rf ../aws-serverless-webapp-workshop