# CI/CD

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

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/cicd

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

Practice exams covering CI/CD: [AIB-C01 (beta) AWS Certified AI Business Strategist](https://blowstack.com/practice-exams/aws-certified-ai-business-strategist), [AIF-C01 AWS Certified AI Practitioner](https://blowstack.com/practice-exams/aws-certified-ai-practitioner), [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

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

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS CodeBuild](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS CodeDeploy](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS CloudFormation](https://blowstack.com/tools/cloud-services-hub/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.
- **[Amazon CloudWatch](https://blowstack.com/tools/cloud-services-hub/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.

## CI/CD exam questions

Real practice exam questions on CI/CD, with the correct answer and its explanation.

### Question 1 (AIB-C01 (beta))

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 2 (MLA-C02 (beta))

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 3 (SAP-C03)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 4 (AIF-C01)

**Question:**

An ML team maintains shared feature-preparation code used by its training workflow. Developers work in separate branches for several weeks. Although automated tests pass on each branch, combining the branches before a release often reveals incompatible changes that break training. The team wants to discover these incompatibilities earlier in development. Which approach best meets this goal?

**Correct answer:** Integrate small changes frequently into a shared codebase and automatically run build and compatibility tests on the combined code.

**Explanation:** Frequent integration with automated checks exposes incompatible changes early, while they are smaller and easier to fix. This applies continuous integration to the ML team's shared code.

### Question 5 (DEA-C01)

**Question:**

A data engineering team uses an AWS CodeBuild action in a CI/CD workflow to test a Python transformation application. The tests must load sample records into an isolated Amazon RDS for PostgreSQL database and verify the transformed values by using a PostgreSQL client. Test failures must block production deployment.

The database is not publicly accessible and accepts connections only from explicitly authorized security groups. The build project currently has no VPC configuration, and database connections time out. Suitable private subnets have available IP addresses and all required access to AWS services. The build image already contains the test dependencies.

Which change will allow the build to run these tests without making the database publicly accessible?

**Correct answer:** Configure the build project to use the database VPC, suitable private subnets, and a dedicated build security group. Permit outbound database traffic from that group and inbound TCP port 5432 on the database security group from the build security group. Grant the build service role the required network-interface permissions.

**Explanation:** VPC-enabled CodeBuild builds use network interfaces in the configured subnets. The build needs the required network-interface permissions and security group rules that allow PostgreSQL connections from the build to the database. This enables the tests to exercise the private database without exposing it publicly.

### Question 6 (AIP-C01)

**Question:**

A medical software company releases domain-specific fine-tuned foundation models to Amazon SageMaker AI endpoints. An existing release pipeline updates a staging endpoint, evaluates the candidate, and then promotes it to production. Only one release runs at a time.

The staging deployment action currently reports success when UpdateEndpoint returns. However, loading a candidate can take 25–40 minutes. Evaluations have sometimes run against the previous model while the update was still in progress. SageMaker deployment guardrails can also roll back a failed update, leaving the staging endpoint healthy but serving the previous model.

The company requires automated evaluations to run only after the requested candidate is active. Production promotion must stop if staging deployment fails, rolls back, or exceeds a defined deadline. The solution must not rely on fixed waiting periods.

Which pipeline design meets these requirements?

**Correct answer:** Use an AWS CodePipeline action to invoke a Standard AWS Step Functions workflow. Have the workflow call UpdateEndpoint and poll DescribeEndpoint until the endpoint is InService with the requested endpoint configuration. Fail the workflow on deployment failure, rollback to the previous configuration, or timeout. Run candidate evaluations only after that verification succeeds, and allow production promotion only after evaluation succeeds.

**Explanation:** The CodePipeline Step Functions action waits for the Standard workflow to finish. The workflow can monitor a deployment that takes longer than a Lambda invocation, enforce a deadline, and verify both endpoint readiness and the identity of the deployed configuration. Checking the configuration prevents a healthy endpoint that rolled back to the previous release from passing the gate.

### Question 7 (CLF-C02)

**Question:**

A company already has tools that build, test, and deploy its application. Employees currently start each tool manually and check whether the previous step succeeded. The company wants code changes to automatically move through these steps, stop if a step fails, and wait for a manager's approval before production deployment. Which solution meets these requirements without the company developing and maintaining custom workflow orchestration?

**Correct answer:** Use AWS CodePipeline to connect the existing tools in successive stages and add a manual approval action before production deployment.

**Explanation:** CodePipeline manages software release workflows across integrated tools. It can start a release when source code changes, prevent progression after a failed action, and pause for manual approval before production deployment.

### Question 8 (DVA-C02)

**Question:**

A team stores an application's source code in GitHub and uses an AWS CodePipeline V2 pipeline to run automated tests, package the application, and deploy it to a test environment. The pipeline has a connection-backed source action configured for the main branch. Developers use feature branches and pull requests, but occasionally push approved hotfixes directly to main.

The developer must configure repository-event automation so that every push to main starts the release pipeline. Pushes to other branches and pull request events must not start it. Which configuration meets these requirements?

**Correct answer:** Configure a Git push trigger for the source action with a branch inclusion filter of main. Do not configure pull request triggers or additional filters.

**Explanation:** A push trigger filtered to main starts the pipeline when main receives changes, including merges and direct hotfix pushes. It does not match pushes to feature branches, and without pull request triggers, pull request events do not start executions.

### Question 9 (DOP-C02)

**Question:**

A company uses AWS CodeDeploy blue/green deployments for an application on Amazon EC2 instances behind a load balancer. Its release process requires business acceptance testing against the fully provisioned replacement environment before any production traffic reaches that environment. Testers have a separate, restricted path to access the replacement instances without changing production routing.

Provisioning must begin automatically when a release artifact is available. After the replacement environment is ready, a release manager must have up to 4 hours to complete acceptance testing and explicitly authorize the traffic switch. If authorization is not provided within that period, the deployment must stop without switching production traffic. The company wants to use native deployment controls without custom workflow orchestration.

Which solution BEST meets these requirements?

**Correct answer:** Configure the CodeDeploy deployment group's deploymentReadyOption with actionOnTimeout set to STOP_DEPLOYMENT and waitTimeInMinutes set to 240. After acceptance succeeds, have the release manager call ContinueDeployment to authorize traffic rerouting.

**Explanation:** The deployment-ready wait occurs after the replacement environment is prepared and before production traffic is rerouted. ContinueDeployment explicitly permits the deployment to proceed. STOP_DEPLOYMENT ensures that expiration of the 240-minute waiting period stops the deployment instead of automatically switching traffic.

## Practice CI/CD in a full exam

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

- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 11 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 8 questions
- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 3 questions
- [AIF-C01](https://blowstack.com/practice-exams/aws-certified-ai-practitioner): 3 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 3 questions
- [AIB-C01 (beta)](https://blowstack.com/practice-exams/aws-certified-ai-business-strategist): 2 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 2 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 2 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 1 question

## What is CI/CD

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.

- AIB-C01 (beta): CI/CD: repeatable release pipelines for AI applications (Premium), https://app.blowstack.com/lessons/ci-cd-repeatable-release-pipelines-for-ai-applications-aib-c01
- MLA-C02 (beta): CI/CD: versioned agent release pipelines (Premium), https://app.blowstack.com/lessons/ci-cd-versioned-agent-release-pipelines-mla-c02
- SAP-C03: CI/CD: orchestrating artifact promotion (Premium), https://app.blowstack.com/lessons/ci-cd-orchestrating-artifact-promotion-sap-c03
- AIF-C01: CI/CD: repeatable ML release pipelines (Premium), https://app.blowstack.com/lessons/ci-cd-repeatable-ml-release-pipelines-aif-c01
- DEA-C01: CI/CD: automated release pipelines for data workloads (Premium), https://app.blowstack.com/lessons/ci-cd-automated-release-pipelines-for-data-workloads-dea-c01
- AIP-C01: CI/CD: gated GenAI release pipelines (Premium), https://app.blowstack.com/lessons/ci-cd-gated-genai-release-pipelines-aip-c01
