Skip to main content
XenonStack

DevOps

XenonStack Blog AWS CodePipeline: How to Build a DevOps Pipeline on AWS

and | Published | Updated

Key takeaway

  • Set up a DevOps pipeline on AWS with CodePipeline, CodeBuild and CodeDeploy. Stages, approvals, what has changed in 2026 and a step-by-step adoption plan.

How do you set up a DevOps pipeline on AWS?

A DevOps pipeline on AWS takes a code change from a repository, builds and tests it, and releases it to an environment with little manual work. The managed route uses AWS CodePipeline to orchestrate the stages, AWS CodeBuild to compile and test, and AWS CodeDeploy or AWS CloudFormation to deploy. For this guide, a pipeline means a software release pipeline, which is different from a data pipeline.

Most enterprise teams already know the tools. The harder decisions are where approvals sit, how infrastructure is versioned, and who can release to production. This guide covers the stages, the AWS services for each, what has changed, and a sequence for adoption. For the wider method, see our CI/CD pipeline stages, tools and best practices.

What are the stages of an AWS DevOps pipeline?

Every pipeline has the same shape: source, build, test, deploy and operate. AWS describes continuous delivery as a service you use to model, visualise and automate the steps required to release your software, and the stages below map to that model.

Diagram mapping pipeline stages source, build, test and deploy to AWS services: repository connection, CodeBuild, test providers, CodeDeploy and CloudFormation, with manual approval before production.
StageWhat happensAWS service that fitsWhen it fits
SourceA commit or tag starts the pipelineAWS CodeCommit, Amazon S3, or a third-party Git host through a connectionUse your existing Git host unless you want repositories inside AWS
BuildDependencies are fetched, code is compiled, unit tests run, artefacts are packagedAWS CodeBuildYou want no build servers to manage
TestIntegration, load and security tests run in a test environmentCodeBuild, AWS Device Farm, or third-party test providersRelease gates that depend on automated evidence
DeployThe artefact is released to computeAWS CodeDeploy, AWS CloudFormation, Amazon ECSChoose by target: instances, serverless or containers
Approve and operateA person approves a release; monitoring watches the resultManual approval with Amazon SNS notificationRegulated releases or production-only gates

What does AWS CodePipeline do?

AWS describes AWS CodePipeline as a continuous delivery service you can use to model, visualise and automate the steps required to release your software. You define stages and actions, and each code change moves through them. The action integrations page groups actions into source, build, test, deploy, approval and invoke categories.

Which source, build and deploy providers does it support?

Source actions include CodeCommit, Amazon S3, Amazon ECR and third-party repositories (Bitbucket Cloud, GitHub, GitHub Enterprise Server, GitLab.com and GitLab self-managed) through connections. AWS does not recommend the older GitHub (via OAuth app) action, so use the GitHub App connection for new pipelines. Build and test actions include CodeBuild and third-party providers such as Jenkins and TeamCity. Deploy actions include CodeDeploy, CloudFormation, Amazon ECS, Amazon EKS and others.

What is the difference between V1 and V2 pipelines?

AWS documents two pipeline types that differ in characteristics and price. V1 has the standard pipeline, stage and action parameters. V2 has the same structure plus additional parameters for release safety and trigger configuration. Check the pipeline types page and the pricing page before choosing, because the pricing basis differs.

How do CodeBuild and CodeDeploy fit in?

AWS CodeBuild is a fully managed build service that compiles source code, runs unit tests and produces artefacts ready to deploy. You pay for the build minutes you use, and there are no build servers to provision or scale. AWS CodeDeploy automates deployments to Amazon EC2 instances, on-premises instances, serverless Lambda functions or Amazon ECS services. For Amazon ECS, it performs a blue/green deployment by installing the new version as a replacement task set.

Infrastructure belongs in the same pipeline. AWS CloudFormation lets you describe servers and networking as files that are versioned with the code, which is the infrastructure as code pattern. Configuration tools such as Ansible cover the machines you still manage directly.

What is the difference between continuous delivery and continuous deployment?

In continuous delivery, every change is prepared for release automatically but a person approves the final push to production. In continuous deployment, the push to production is automatic once the tests pass. Most regulated enterprises start with continuous delivery and a manual approval action, then move low-risk services to continuous deployment as test coverage and monitoring earn trust.

Approvals are where governance usually breaks down, because evidence sits in chat threads and tickets. An approval step can be backed by a governed decision record: Approval Agent is described by ElixirData as assembling evidence, evaluating policy and recording full decision lineage, and ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents.

Is AWS Data Pipeline part of a DevOps pipeline?

No. The older version of this guide mixed the two. AWS Data Pipeline moves and processes data between AWS storage and compute services at set intervals, so it belongs to data engineering, not software release. It is also closed to new customers and in maintenance mode: AWS says existing customers can continue to use it, and no new features or region expansions are planned. For a release pipeline, use CodePipeline. For new data workflows, follow the AWS migration guide for Data Pipeline.

What has changed in AWS developer tooling?

ItemCurrent statusWhat to do
AWS CodeCommitAWS announced on 24 November 2025 that it is back to full general availability, available in 29 regions, with new customer sign-ups openTreat it as an option again, and still allow a third-party Git host through a connection
AWS Data PipelineClosed to new customers; in maintenance modeDo not start new work on it; plan migration for existing workloads
CodePipeline GitHub (OAuth app) actionNot recommended by AWS; existing pipelines continue to workMove to the GitHub App connection
CodePipeline pipeline typesV1 and V2 are available, with different features and priceReview V2 trigger and release-safety parameters for new pipelines

How do you secure and govern the pipeline?

The pipeline holds the keys to production, so treat it as a production system. Keep source, build and deploy roles separate with least-privilege IAM. Add security checks between build and deploy; the CodePipeline invoke category includes an Amazon Inspector scan action for source code and Amazon ECR images. Require a manual approval for production, notify approvers through Amazon SNS, and keep the approval record with the release. Track cost by build minutes and pipeline type.

What is a sensible adoption sequence?

  1. One service first. Pick a low-risk service and build source, build and unit test in CodePipeline and CodeBuild.
  2. Add environments. Deploy to staging with CodeDeploy or CloudFormation, with integration and load tests as gates.
  3. Add approval and security checks. Put a manual approval before production and a vulnerability scan before deploy.
  4. Measure. Track lead time, deployment frequency, change failure rate and recovery time. See our guide to DevOps metrics.
  5. Scale the pattern. Template the pipeline, then extend it to other teams.

The wider operating model, including team structure and ownership, is in our enterprise DevOps operating model guide. If your team is on Microsoft tooling instead, compare Azure DevOps pipelines. AI agents are starting to take on sprint and delivery coordination work too; Agent Scrum presents itself as a way to automate sprint planning and Scrum ceremonies with agentic AI.

What are the trade-offs, and when should you not use it?

  • CodePipeline suits teams that are mostly on AWS. If your estate spans several clouds, a cloud-neutral tool may be simpler to operate.
  • Managed services reduce server work but tie your release model to AWS constructs.
  • A pipeline cannot fix weak tests. Automating a poor test suite only releases defects faster.
  • Fully automatic production deployment is not right for every service. Keep a human approval where the change carries regulatory or financial risk.

Watch: accelerating a DevOps pipeline on AWS

Video: Accelerating DevOps Pipeline on Amazon Web Services.

To map one release decision your pipeline and agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop. For help building the pipeline itself, see our DevOps services.

What should you plan for in 2027?

Plan the next year around a few decisions that the guide already covers. They keep a release pipeline safe as your estate grows.

  • Review pipeline types. Check the V2 trigger and release safety parameters, and the pricing basis, before you build new pipelines.
  • Move off older actions. Switch any GitHub OAuth app action to the GitHub App connection, and do not start new work on AWS Data Pipeline.
  • Keep approval evidence. Put a manual approval before production, notify approvers through Amazon SNS, and store the record with each release.

Frequently asked questions

What is the best AWS service for a CI/CD pipeline?

AWS CodePipeline orchestrates the stages, AWS CodeBuild builds and tests, and AWS CodeDeploy or AWS CloudFormation deploys. Together they form the managed CI/CD route on AWS.

Is AWS Data Pipeline the same as AWS CodePipeline?

No. AWS Data Pipeline moves and processes data between services at set intervals. AWS CodePipeline automates software release stages. AWS Data Pipeline is closed to new customers and in maintenance mode.

Can CodePipeline use GitHub or GitLab as a source?

Yes. Connections give access to Bitbucket Cloud, GitHub, GitHub Enterprise Server, GitLab.com and GitLab self-managed repositories. AWS recommends the GitHub App option over the OAuth app action.

Is AWS CodeCommit still available?

Yes. AWS announced on 24 November 2025 that CodeCommit returned to full general availability, with new customer sign-ups open and availability in 29 regions.

What does AWS CodeDeploy deploy to?

Amazon EC2 and on-premises instances, serverless Lambda functions and Amazon ECS services. For Amazon ECS it performs blue/green deployments.

How do you keep a human in control of production releases?

Add a manual approval action before production and notify approvers through Amazon SNS. Keep the approval record with the release so audits can see who approved what.

Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.

Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue