Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
AWS Automation Cookbook

You're reading from   AWS Automation Cookbook Continuous Integration and Continuous Deployment using AWS services

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781788394925
Length 388 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Nikit Swaraj Nikit Swaraj
Author Profile Icon Nikit Swaraj
Nikit Swaraj
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Using AWS CodeCommit 2. Building an Application using CodeBuild FREE CHAPTER 3. Deploying Application using CodeDeploy & CodePipeline 4. Building Scalable and Fault-Tolerant CI/CD Pipeline 5. Understanding Microservices and ECS 6. Continuous Deployment to ECS Using Developer Tools and CloudFormation 7. IaC Using CloudFormation and Ansible 8. Automating AWS Resource Control Using AWS Lambda 9. Microservice Applications in Kubernetes Using Jenkins Pipeline 2.0 10. Best Practices and Troubleshooting Tips

Introducing AWS CodeCommit - Amazon managed SaaS Git

AWS CodeCommit is a version control system, which is managed by Amazon Web Services, where we can privately store and manage assets in the Cloud and integrate with AWS. It is a highly scalable and secure VCS that hosts private Git repositories and supports the standard functionality of Git, so it works very well with your existing Git-based tools.

The following are the benefits of CodeCommit:

  • Managed service: CodeCommit is fully managed, distributed, fault tolerant, and carries no administrative overhead. It is elastic (able to adapt to a high workload) and, as mentioned, integrated with other AWS services.
  • No limit to storage and file type: We can store as many files as we want, because CodeCommit does not have space limitations. We can store not only source code but also documents and binary files.
  • Data and access security: CodeCommit repositories are encrypted while they are in AWS CodeCommit or when getting cloned somewhere. It is also integrated with IAM for user-level or specific API-level security.
  • HA (high availability): Whatever data we push into the repository, it will replicate across AZs (Availability Zones).
  • Easy migration of Git-based repository: We can easily migrate a remote Git-based repository to AWS CodeCommit.

These are some limitations or drawbacks of self-hosted VCS (BitBucket/GitHub/GitLab), which you won't find in AWS CodeCommit:

  • We may have to pay a license fee on a per-developer basis
  • We may end up with high hardware maintenance costs and high support staffing costs
  • Limitation on the amount and types of files that can be stored and managed
  • Limitation on the number of branches, the amount of version history, and other related metadata that can be stored

How to do it...

AWS CodeCommit is configured just like other Git-based repositories, such as GitHub. The following diagram shows how we use a development machine, AWS CLI/AWS Console, and CodeCommit to create and manage a repository:

(Reference: AWS CodeCommit Docs)

The basic workflow is described as follows:

  1. Using AWS CLI or CodeCommit Console, we can create a CodeCommit repository.
  2. Post that, use git clone in the CodeCommit repository URL on your local development machine.
  3. Once the repository gets cloned into the development machine, make the changes in the repository by adding to or editing the files. After that, enter the git add command and put it into the staging area, commit by giving a change message, and then push it back to the repository.
  4. After that, we can carry out git pull to synchronize the code in the AWS CodeCommit repository with our local repository. At this point in time, you will be working with the latest changes and the versions of the files.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime