AWS CodePipeline のアイコン

AWS CodePipeline Popular2015年〜

A service for building and automating CI/CD pipelines from source to deployment

What It Does

AWS CodePipeline is a CI/CD (Continuous Integration/Continuous Delivery) service that detects source code changes and automates the entire release process - build, test, and deploy. Pipelines are divided into stages, with each stage executing different actions (source retrieval, build, approval, deploy, etc.). It eliminates manual release work and delivers code changes to production quickly and safely.

Use Cases

CodePipeline is used to automate release workflows such as: automatically triggering builds and tests when code is pushed to GitHub, deploying to a staging environment after tests pass, then deploying to production after manual approval. It is also used for automating Lambda function deployments and infrastructure CI/CD that automatically applies CloudFormation template changes.

Everyday Analogy

Think of it like a factory assembly line. When raw materials (source code) enter the line, they pass through each station (build, test, quality inspection) in sequence, and the finished product (deployed application) ships at the end. CodePipeline automates this assembly line, stopping or advancing the line based on the results at each station.

What Is CodePipeline?

AWS CodePipeline is a service that automates the software release process. When a developer makes code changes and pushes them to a repository, CodePipeline automatically executes each step - build, test, and deploy. This eliminates the need for manual build and deploy tasks, preventing human errors while increasing release frequency.

Pipeline Structure

A pipeline consists of multiple stages. A typical configuration is three stages: Source (retrieve source code) -> Build (build and test) -> Deploy (deploy). The Source stage retrieves code from GitHub, CodeCommit, S3, or other sources. The Build stage runs builds and tests using CodeBuild. The Deploy stage deploys to CloudFormation, ECS, S3, or other targets. You can also insert manual approval actions between stages.

Integration with Other AWS Services

CodePipeline integrates with numerous AWS services and third-party tools. It supports GitHub, Bitbucket, and CodeCommit as source providers. CodeBuild and Jenkins can be used as build providers. CloudFormation, ECS, S3, Lambda, and Elastic Beanstalk are supported as deploy providers. This flexible integration enables you to build release pipelines for a wide variety of architectures. To get a comprehensive overview of integrations with other AWS services, related books on Amazon can be a helpful reference.

Getting Started

To get started with CodePipeline, click "Create pipeline" in the CodePipeline console. Select a source provider (such as GitHub), specify the repository and branch, configure a build provider (CodeBuild), and choose a deploy provider. Once the pipeline is created, it automatically runs whenever source changes are detected.

Things to Watch Out For

  • Pipelines are billed monthly per active pipeline. Delete or disable unused pipelines to keep costs down
  • When a pipeline execution fails, it stops at that stage. Fix the root cause and retry, or correct the source and re-run
  • Adding a manual approval stage before production deployment prevents unintended deployments. Configure SNS notifications to alert the approver
共有するXB!