Cloud concept · Updated

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

In short

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.

Cloud Concepts Hub →

6 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.

01
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.

02
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.

03
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.

04
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.

05
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.

06
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 CodePipelineAWS 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.

AWS CodeBuildAWS 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.

AWS CodeDeployAWS 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.

AWS CloudFormationAWS 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.

Amazon CloudWatchAmazon 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.

CI/CD exam questions

Real practice exam questions on CI/CD, with the correct answer and its explanation. Answer them with every option in the exam simulator.

AIB-C01 (beta)

A legal services company is expanding an AI contract-summary application to eight business units. Teams update application code and prompts weekly. Although releases pass central testing, teams recreate deployment packages during each business unit's rollout, and production versions sometimes differ from the version evaluated. Company policy requires every production release to use the evaluated version and have recorded authorization from the risk owner. Which release approach should the AI business strategist recommend to support frequent updates while meeting these requirements?

Show answerCORRECT ANSWER

Use a shared automated workflow to validate frequently merged changes, create a versioned release package, and run application and AI-quality tests. Promote that same package to production only after recorded risk-owner approval.

This approach applies continuous integration and continuous delivery. Automated checks provide timely feedback, promoting the same versioned package prevents differences between evaluated and deployed releases, and an approval gate preserves the required release authorization.

MLA-C02 (beta)

An ML team uses AWS CodeBuild to validate every proposed change to an inference application's feature-preprocessing code. The current tests replace the preprocessing function with a mock that returns a valid feature vector and verify that the application constructs the expected inference request. Several changes that incorrectly calculate numerical features have passed these checks.

The team needs an additional required CI check that detects calculation regressions before changes are merged. The check must finish quickly and run without AWS credentials or network access. Which testing approach meets these requirements?

Show answerCORRECT ANSWER

Run the actual preprocessing function in CodeBuild against small, version-controlled input fixtures. Assert expected feature values for normal, boundary, and missing-value cases, replace external service clients with test doubles, and fail the check when an assertion fails.

This approach exercises the calculation logic directly while isolating external dependencies. Explicit expected values detect numerical regressions, small fixtures provide fast feedback, and failing the required CI check prevents changes with failing tests from being merged.

SAP-C03

A company uses an AWS CodePipeline V2 pipeline to release an application. Each execution receives an immutable artifact for a specific source revision. The pipeline deploys the artifact to a single shared staging environment, runs integration tests against that environment, and then deploys the artifact to production. These activities currently occupy separate stages.

Developers submit changes more frequently than the integration tests complete. The company must prevent another execution from changing staging between the start of a staging deployment and the completion of its integration tests. Every execution that passes its checks must proceed toward production in execution start order without being discarded when a newer execution arrives. Builds may run concurrently, but the company cannot create additional staging environments or maintain custom locking logic.

Which pipeline configuration meets these requirements?

Show answerCORRECT ANSWER

Use QUEUED execution mode. Put staging deployment and integration testing in the same stage, with deployment assigned runOrder 1 and testing assigned runOrder 2. Keep production deployment in a subsequent stage.

QUEUED mode prevents waiting executions from being superseded and preserves their order through stages. Keeping staging deployment and testing in one stage holds that stage for the entire deployment-and-test sequence. The runOrder values ensure tests start only after deployment succeeds, and the next execution cannot enter that stage until the sequence completes. Earlier build stages can still process other executions.

Practice CI/CD in a full exam

Questions on CI/CD in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is CI/CD

2 min read

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.

Learn CI/CD in lessons

12 short lessons on CI/CD in 8 certification courses.

and 6 more lessons

Open the lessons