In this course, we’ll provide you with an introduction to AWS CodeCommit and how it can be used to manage your source code. We’ll show you where AWS CodeCommit sits in a CI/CD setup. This lecture will familiarize yourself with the AWS CodeCommit service and ensure you know when and where to use it within your own software projects. We'll then provide a demonstration where we use AWS CodeCommit to deploy and manage source code build for our web portal project.
The source code demonstrated within this course can be cloned from the following GitHub repository:
- [Instructor] Welcome back. In this lecture, we'll provide a brief introduction to AWS CodeCommit and how it can be used to manage your source code. We'll show you where AWS CodeCommit sits in a CICD setup. This lecture will familiarize yourself with the AWS CodeCommit service and ensure you know where and when to use it within your own software projects. Okay, let's begin. AWS CodeCommit is a fully managed source control service. AWS CodeCommit can be used to host your own private git repositories in a fully secured environment managed by AWS. AWS CodeCommit is an extremely simple service designed with all the features you come to expect from a git-based source control system. For starters, AWS CodeCommit supports all familiar git commands ensuring that you can use any existing git client tools and/or commands added from the command line or terminal. AWS CodeCommit supports typical git operations such as climb, pull, push, and fetch. AWS CodeCommit acts as the source control system for your software projects. It is the service into which you commit your code changes. In essence, AWS CodeCommit is the starting component within a CICD setup. Any commits into AWS CodeCommit trigger downstream activity within your CICD setup such as ticking off a new build of your source code. The steps to set up a new git repository within AWS CodeCommit are simple and effortless. You can have your own git repository available within minutes. The first and really only significant requirement is to give your new repository a name. To complete the new repository setup, you have the option of configuring email notifications for particular events. This configuration is completed through the use of a CloudWatch event role. AWS CodeCommit provides several integration options. Using any combination of the following allows you to extend and customize your source code workflow. Repository triggers. Within a repository, you can register repository triggers to trigger actions, for example sending a message to an SNS topic or to a lambda function. CodeCommit CloudWatch Events. CodeCommit integrates with CloudWatch Events. This allows you to create event-driven workflows that trigger off particular events that occur within your CodeCommit repository. For example, pipelines created within CodePipeline can be triggered to execute when a commit takes place within your repository. There are two connection options available to you when attempting to connect to your AWS CodeCommit hosted git repositories. The first option is to do so over the standard HTTPS protocol using port 443. This is useful when working behind corporate files that may block other types of outbound traffic. The second option is to do so over the SSH protocol using port 22. Regardless of chosen connection type, both protocols ensure that all source code transferred to and from the repository is encrypted for security. Authenticated access into a CodeCommit repository is managed through the use of an IAM user account. Depending on the connection type, HTTPS or SSH, you'll need to either generate HTTPS git credentials or upload an SSH public key respectively on the IAM user account in question. An HTTPS git credential is nothing more than an auto generated username and password combination. Most if not all git client tools will support either or both of these authentication methods. Additionally, IAM policies can be used to provide fine-grained identity-based access to know repositories by name. For example, an IAM user who has the following attached policy will be allowed to perform equivalent get, pull, and push commands on the two repositories named CloudAcademyRepo1 and CloudAcademyRepo2. Okay, that completes this introduction lecture on the AWS CodeCommit service. Go ahead and close this lecture and we'll see you shortly in the next one.
Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, GCP, Azure), Security, Kubernetes, and Machine Learning.
Jeremy holds professional certifications for AWS, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).