Introduction
In the previous article, we learned about AWS CodeCommit, AWS’s managed Git repository service.
Although CodeCommit can store source code, simply storing code is not enough.
Every time developers make changes to an application, someone still needs to:
- Build the application
- Test it
- Package it
- Deploy it
Imagine a company with 200 developers.
If every deployment had to be done manually, software releases would become slow and error-prone.
This is why CI/CD pipelines are important.
In this article, we will learn:
- What CI/CD is
- How a traditional CI/CD pipeline works
- What AWS CodePipeline is
- How CodePipeline works with other AWS services
- Why AWS provides its own CI/CD service
By the end of this article, we will understand where CodePipeline fits into the software delivery process.
What is CI/CD?
CI/CD stands for:
- Continuous Integration (CI)
- Continuous Delivery / Continuous Deployment (CD)
Think of CI/CD as an automated assembly line for software.
Instead of manually building and deploying the application every time code changes, the pipeline performs those tasks automatically.
Without CI/CD, the process might look like this:
Developer
↓
Writes Code
↓
Builds Application
↓
Tests It
↓
Deploys It
Enter fullscreen mode Exit fullscreen mode
Every step is done manually.
With CI/CD, the process becomes:
Developer
↓
Push Code
↓
Pipeline Runs Automatically
↓
Application is Deployed
Enter fullscreen mode Exit fullscreen mode
This saves time, reduces mistakes, and provides faster feedback.
How Does CI/CD Usually Work?
Before understanding AWS CodePipeline, let’s see how CI/CD is commonly implemented in many organizations.
A typical setup looks like this:
Developer
⬇️
GitHub / GitLab
⬇️
Jenkins
⬇️
Docker Registry
⬇️
Kubernetes / EC2
Enter fullscreen mode Exit fullscreen mode
What Happens Here?
- A developer pushes code to GitHub.
- GitHub notifies Jenkins using a webhook.
- Jenkins starts the pipeline.
- Jenkins builds and tests the application.
- Jenkins creates a Docker image.
- The image is stored in a container registry.
- The application is deployed to Kubernetes or EC2.
This process is completely automated.
What is a Jenkins Pipeline?
A Jenkins pipeline is a series of automated steps that Jenkins executes whenever new code is pushed.
A pipeline may include stages such as:
- Checkout source code
- Compile the application
- Run unit tests
- Perform code quality checks
- Scan for security vulnerabilities
- Build a Docker image
- Push the image to a container registry
- Deploy the application
Each stage runs automatically in the defined order.
What is Continuous Integration (CI)?
Continuous Integration focuses on validating code changes as early as possible.
Whenever developers push new code, the CI system automatically:
- Downloads the latest code
- Builds the application
- Runs automated tests
- Checks code quality
- Detects bugs early
The goal is to identify problems before the application reaches production.
A simple CI flow looks like this:
Developer
⬇️
Push Code
⬇️
Checkout Code
⬇️
Build
⬇️
Run Tests
⬇️
Scan Code
⬇️
Build Docker Image
⬇️
Push Image
Enter fullscreen mode Exit fullscreen mode
What is Continuous Delivery (CD)?
Once CI completes successfully, the application is ready to be deployed.
Continuous Delivery (CD) automates the deployment process.
Instead of manually copying files to servers, the deployment tool automatically releases the new version.
Typical deployment targets include:
- Amazon EC2
- Amazon ECS
- Kubernetes (AWS EKS)
- AWS Lambda
How Does AWS Solve This Problem?
Instead of using separate third-party tools, AWS provides its own managed CI/CD services.
These services work together to build a complete CI/CD pipeline.
Service Purpose AWS CodeCommit Stores source code AWS CodePipeline Orchestrates the workflow AWS CodeBuild Builds and tests the application AWS CodeDeploy Deploys the applicationTogether, these services automate the software delivery process.
Note: In our next hands-on article, we will use GitHub instead of AWS CodeCommit.
What is AWS CodePipeline?
AWS CodePipeline is a fully managed service that automates the entire software release process.
Instead of manually performing every deployment step, CodePipeline coordinates each stage automatically.
Think of CodePipeline as the project manager of your entire CI/CD workflow.
It decides:
- When to start the pipeline
- Which stage runs next
- Whether the stages should continue
- Whether the deployment succeeds or fails
CodePipeline itself doesn’t build or deploy applications.
Instead, it connects different AWS services together.
How AWS CodePipeline Works
A typical AWS CodePipeline looks like this:
Developer
⬇️
GitHub
(Source Code)
⬇️
AWS CodePipeline
⬇️
AWS CodeBuild
⬇️
AWS CodeDeploy
⬇️
EC2 / ECS / EKS / Lambda
Enter fullscreen mode Exit fullscreen mode
Each AWS service has a specific responsibility.
What Happens Inside CodeBuild?
CodeBuild performs CI tasks.
Typical stages include:
- Checkout the source code
- Build the application
- Run unit tests
- Perform code quality checks
- Scan for vulnerabilities
- Build Docker images
- Push images to Amazon ECR
Once these steps complete successfully, CodePipeline moves to the deployment stage.
What Does CodeDeploy Do?
CodeDeploy handles the Continuous Delivery (CD) process.
It automatically deploys the latest version of the application to:
- Amazon EC2
- Amazon ECS
- AWS Lambda
- On-premises servers
This removes the need for manual deployments.
Real-World Example
Imagine an online shopping application.
A developer fixes code in the checkout page and pushes the changes to GitHub.
Immediately:
- CodePipeline detects the changes.
- CodeBuild compiles the application.
- Automated tests run.
- If everything passes, CodeDeploy deploys the new version.
- Customers receive the updated application without any manual intervention.
The entire process happens automatically.
Jenkins vs AWS CodePipeline
Feature Jenkins AWS CodePipeline Installation Required Yes No Server Management Yes No Scaling Manual Automatic AWS Integration Plugins Required Native Maintenance User Managed AWS ManagedJenkins offers greater flexibility, while CodePipeline provides a simpler, fully managed experience within AWS.
답글 남기기