Implementing Cloud Design Patterns for AWS(Second Edition)
上QQ阅读APP看书,第一时间看更新

CodeCommit

CodeCommit gives you private GitHub repositories. To connect the preceding repository you created, copy the URL or click on the Clone URL button as shown in the following screenshot:

Add the repository by running the following commands in the bash panel: 

git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
git init
git clone git config --global credential.helper '!aws codecommit credential-helper $@'
git remote add https://git-codecommit.us-east-1.amazonaws.com/v1/repos/cloudpatternsrepo

Add and commit your files using the following commands:

git add create_env.tf
git commit -am 'terraform example file using instance credentials'
git push

Now, you can see them in CodeCommit:

As we move to more complex workflows, we will be using CodeBuild to compile our code. Our continuous delivery model requires a deployment mechanism for updating product features when they are complete. CodeDeploy lets us do this in an automated, repeatable fashion while helping us to avoid typing mistakes.

AWS also provides template repositories in its CodeStar service. These frameworks give you an excellent starting point for web services.