Besides open-source tools, different cloud services providers provide their cloud-native tools to implement DevOps practices on the cloud. This article describes different tools and technologies provided by AWS to implement DevOps on AWS.
AWS CodeCommit is a service used for version control and hosted by AWS. Just like other version control services like Github, Bitbucket, and Gitlab, source code can be pushed to private repositories in CodeCommit. There are no public repositories on AWS CodeCommit.
AWS CodeCommit is a highly available, secure, and scalable service used to host private code repositories. Using AWS CodeCommit, you do not need to upgrade the service if your repositories increase beyond a limit. It automatically scales with the increase in the number of repositories or repository size.
Following is the list of some benefits provided by the AWS CodeCommit service.
- Highly available and fully managed service
- Stores the code with encryption at rest
- Work collaboration
- Scalable version control service
- Integrated with some AWS and third-party services
- Easy migration from other repositories
- Supports Git commands you already know
AWS CodeCommit console provides a friendly graphical user interface to visualize pull requests, commits, branches, and git tags. Repositories from CodeCommit can be cloned using SSH and HTTPS URLs.
In the settings of the CodeCommit repository, you can enable notifications and triggers to notify when a specific event like (create a branch, delete a branch, on pull request) occurs.
AWS CodeBuild is a fully managed service used to run tests, build the code and generate the build artifacts from the code. Using AWS CodeBuild, you do not need to provide an extra build server to build the source code. It provides pre-configured environments for most of the popular programming languages like python, java, nodejs and builds tools like maven, npm, and gradle. You can also create your own customized environments to build your project using AWS CodeBuild.
AWS CodeBuild is a serverless service, and you are only charged when a build is running. In this way, you can save money for an extra server for building the projects. Following are some benefits of using the CodeBuild service from AWS.
- CodeBuild is a fully managed service, and you do not need to update and manage the build server.
- It is a scalable service and scales with the increase in processing. You only pay for the time the build is running.
- It provides pre-configured build environments that make it easy to use.
- You can also create your own customizable build environments on CodeBuild.
AWS CodeBuild can be integrated with different source code provider services to fetch the code. You can fetch the code from Github, Bitbucket, Github enterprise, CodeCommit, and S3. Also, you can configure the CodeBuild service to send the build logs to the CloudWatch logs that can help to diagnose the build failures. To communicate with CloudWatch, AWS CodeBuild needs an IAM role with specific permissions.
AWS CodeDeploy is a fully managed service provided by AWS to deploy the pre-built application to different compute services like EC2, AWS Lambda, AWS ECS, and on-premises servers. AWS CodeDeploy service can automatically deploy the following type of content.
- AWS lambda function
- Executable files
- Multimedia files
AWS CodeDeploy is a serverless service, and you are only charged when a deployment is running, and the rest of the time, you are not charged. Just like AWS CodeBuild, AWS CodeDeploy also eliminates the need to provision an extra server for deployment purposes. Following are some benefits of using the AWS CodeDeploy service.
- CodeDeploy can be used to deploy traditional applications on servers and applications that deploy lambda functions to AWS lambda.
- It can be used to fully automate the process of code deployment across different environments like (Dev, Test, Prod).
- It can be used to perform a blue/green deployment which avoids the downtime of the application during deployment.
- Deployment can be rolled back if some error occurs while deploying the latest version.
AWS CodePipeline is a service that is used to visualize a complete CICD pipeline using a friendly graphical user interface. It creates a nice GUI of a pipeline by combining different services like AWS CodeCommit, AWS CodeBuild, AWS CodeDeploy. It makes the software release process easier by visualizing each step of the pipeline.
When a developer pushes the code to the CodeCommit, the CodePipeline, if appropriately configured, dates the new code and passes the latest code to the AWS CodeBuild service to run tests and build code artifacts. After building the artifacts, these artifacts are passed to the AWS CodeDeploy service to deploy the latest version of the application to the server.
All these steps can be visualized and integrated with each other in the CodePipeline service. While deploying the code from staging to a production environment, a manual approval step can be added using AWS CodePipeline. In order to deploy the code to the production environment, someone with specific permissions must approve the deployment. It avoids deploying an unauthentic commit to the production, which may break the production environment.
Amazon CodeGuru is a service provided by AWS to review the source code. AWS CodeGuru uses machine learning and program analytics to review the source code and find the potential defects in the code. After finding the defects in the source code, AWS CodeGuru gives suggestions to resolve these defects for java and python programming languages.
Currently, AWS CodeGuru only supports Java and Python programming languages and can read the source code from the following source providers.
- AWS CodeCommit
- AWS S3
- Github Enterprise Cloud
- Github Enterprise Server
There are different AWS cloud-native services that can be used to build a complete CICD pipeline. The main benefit of using the AWS proprietary services is that these services are fully managed serverless services and interact with each other privately. There are different services for storing source code (AWS CodeCommit), building and running tests on the code (AWS CodeBuild), deploying the code to servers (AWS CodeDeploy) on AWS. These all services can be integrated with each other to create a complete pipeline using AWS CodePipeline service. This article gives a brief understanding of all these AWS services to implement DevOps practices on AWS.