CLOUD CONCEPT

CI/CD

CI/CD is a software engineering approach that continuously integrates code changes and automates their validation and delivery or deployment.

Cloud Concepts Hub →

What is CI/CD

Continuous integration validates frequently merged code changes through automated builds and tests, while continuous delivery or continuous deployment automates the path toward production. Together, these practices shorten feedback cycles, make releases more repeatable, and reduce the risks associated with large, manually executed changes.

CI/CD connects source code changes to a repeatable process for building, testing, and releasing software. Continuous integration, or CI, means developers frequently merge small changes into a shared codebase and receive automated feedback. A successful integration typically requires the application to build and its automated checks to pass. Simply running a scheduled build does not establish effective CI if developers keep incompatible changes isolated for long periods.

The CD portion has two related meanings. Continuous delivery keeps validated changes ready for production deployment, but a person or business process can still approve the production release. Continuous deployment automatically deploys changes to production after they pass the required checks, without a separate manual production approval. Exam questions often test this distinction: an approval gate is compatible with continuous delivery, but not with fully automated continuous deployment.

A cloud pipeline commonly starts when a developer pushes a change to a source repository. An execution environment retrieves the source, installs dependencies, compiles or packages the application, and runs tests. The resulting artifact might be an application archive or container image. Later stages deploy that artifact to a test environment, run additional checks, and promote the same artifact toward production. Reusing an immutable artifact avoids rebuilding different binaries for each environment; environment-specific configuration should be supplied separately.

For example, a team updating an online checkout API could run unit tests and dependency checks on every proposed change. After merging, the pipeline packages the API, deploys it to staging, and runs integration tests against a test database. A production approval can then authorize deployment. A canary release can expose a small portion of traffic to the new version while monitoring errors and latency before expanding deployment.

Cloud services provide distinct capabilities within this workflow. Pipeline orchestration coordinates stages and approvals; build services execute compilation and tests; deployment services update application targets. Infrastructure as code can provision the networks, permissions, and runtime resources required by the application. Logs, metrics, alarms, and distributed traces help engineers investigate failed builds, deployment failures, and application behavior after release. An orchestrator is not necessarily the service that compiles code or hosts the running application.

Automation introduces trade-offs. Teams must maintain pipeline definitions, reliable tests, build environments, and deployment permissions. Frequent executions consume resources, and slow or flaky tests can undermine confidence. Pipeline identities should use least-privilege permissions, secrets should come from controlled secret storage, and untrusted code should not receive production credentials. Approval requirements and separation between environments can provide additional safeguards.

CI/CD does not guarantee defect-free software, require a particular cloud provider, or mean every commit must reach production. Deployment rollback also requires planning: restoring an earlier application version might not reverse an incompatible database migration. Effective implementations combine automated validation, compatible changes, observable deployments, and a tested recovery strategy rather than treating a successful pipeline execution as proof that a release is safe.

Key aspects of CI/CD

CI/CD combines frequent integration, automated validation, repeatable releases, access controls, and operational feedback to make software changes easier to evaluate and deploy safely.

Frequent integration and fast feedback

Merge small changes frequently and validate them with automated builds and tests. Early feedback helps engineers find integration problems while the relevant changes are still small.

Delivery versus deployment

Continuous delivery keeps software ready to release and can include production approval. Continuous deployment removes that manual production gate for changes that satisfy the automated checks.

Repeatable artifact promotion

Create a versioned artifact and promote the same artifact through test and production environments. Keep environment configuration separate to reduce differences between what was tested and what is deployed.

Automated quality and security gates

Use tests, dependency checks, and policy checks to prevent unsuitable changes from progressing. Protect pipeline credentials and limit each stage to the permissions it needs.

Controlled release and recovery

Use deployment strategies such as canary or blue/green releases where supported to limit exposure to faulty changes. Plan rollback or roll-forward procedures, including how database changes affect recovery.

Operational feedback

Connect build and deployment records with application logs, metrics, and alarms. Passing tests is only one signal; production health must also be evaluated after deployment.

Cloud services for CI/CD

AWS CodePipeline can coordinate a workflow that retrieves source changes, invokes AWS CodeBuild for compilation and tests, and proceeds through approval and deployment stages. AWS CloudFormation can provision or update supporting infrastructure, while AWS CodeDeploy handles application deployment to supported targets. Amazon CloudWatch supplies logs and health signals for investigating failures and assessing release behavior. These responsibilities are distinct: orchestration coordinates work, build tools produce artifacts, deployment tools update applications, and monitoring provides feedback. Teams can combine these services with external repositories and development tools rather than requiring every part of the workflow to come from one provider.

AWS CodePipeline image AWS CodePipeline

Orchestrates release pipelines containing source, build, test, approval, and deployment actions. It coordinates other tools rather than serving as the application's runtime or performing every action itself.

Open AWS CodePipeline →
AWS CodeBuild image AWS CodeBuild

Runs build commands, automated tests, and packaging tasks in managed build environments. It can produce artifacts for later deployment stages without requiring teams to manage persistent build servers.

Open AWS CodeBuild →
AWS CodeDeploy image AWS CodeDeploy

Automates application deployments to supported targets, including Amazon EC2 instances, on-premises servers, AWS Lambda functions, and Amazon ECS services. Available deployment strategies and rollback behavior depend on the target platform and configuration.

Open AWS CodeDeploy →
AWS CloudFormation image AWS CloudFormation

Defines and provisions AWS infrastructure using templates that can be version-controlled and deployed through a pipeline. This makes infrastructure changes reviewable and repeatable alongside application changes.

Open AWS CloudFormation →
Amazon CloudWatch image Amazon CloudWatch

Provides logs, metrics, and alarms used to troubleshoot builds and evaluate application health after deployment. Configured alarms can also contribute to deployment stop or rollback decisions through supported integrations.

Open Amazon CloudWatch →