Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
AWS · DVA-C03

CI/CD pipelines and source control

DVA-C03 · Lesson 19 of 24 · 2:35:09

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the DVA-C03 exam (AWS Certified Developer – Associate). In this lesson: Git branches, pull requests, and tags, pipeline sources, CodeArtifact, CodePipeline stages, triggers, manual approvals, cross-account deployments, stage conditions, and rollback, CodeBuild buildspec files, secrets, and caching, and AI-assisted reviews in the pipeline. Includes three original practice questions.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Released from a laptop

At AnyCompany Tickets, releases were built on a laptop and copied by hand. Nobody knew which commit was running in production, and a change pushed to a feature branch once started the production pipeline. This lesson covers branches and tags, repositories in deployments, CodePipeline and CodeBuild, and AI tools in CI/CD.

Branches and tags

Git keeps every version of the code. The main branch holds what can be released, feature branches hold work in progress and merge through pull requests, and a release branch can stabilize a version. A tag labels one commit, like version 2.4.0, and an annotated tag also keeps its author, its date, and a message. And the release builds reuse the tag or the commit ID in their names, so whatever runs in production points back to one commit.

Repositories in deployments

A pipeline takes its source from a repository on GitHub, GitLab, or Bitbucket, through a connection, or from an S3 bucket or an ECR image. The packages that a build needs come from AWS CodeArtifact, a private package repository for pip, npm, or Maven, connected upstream to public repositories, so builds use approved versions. And no secret goes into a repository: the build reads secrets from Parameter Store or Secrets Manager.

AWS CodePipeline

AWS CodePipeline models a release as stages, like source, build, test, and production, each with actions that pass artifacts through an S3 bucket. Triggers start the pipeline on a push or a pull request, filtered by branch, file path, or tag, and excludes win over includes. A manual approval action holds the pipeline before production until someone approves, it can notify approvers through SNS, and it fails after seven days without an answer. A stage can deploy to another account, with a customer managed KMS key for the artifacts and a role in the target account. And stage conditions add checks, like waiting for a CloudWatch alarm to clear, while a failed stage can roll back to its last successful execution.

AWS CodeBuild

AWS CodeBuild runs each build in a fresh container, from a buildspec file at the root of the repository. Its phases install the tools, prepare, build, and finish, and it reads secrets from Parameter Store or Secrets Manager. It publishes artifacts and test reports, and building Docker images needs privileged mode, before a push to ECR. And a cache for dependencies speeds up the next builds.

AI in CI/CD

AI tools help around the pipeline. Before an approval, Kiro CLI in headless mode can review the change in a build step, and summarize its risks for the approver, who still decides. To provision an environment, Kiro can write the CloudFormation or CDK code of a new test environment from a prompt, reviewed like any other code. And after a deployment, a headless run executes smoke tests and checks the logs, while a stage condition on a CloudWatch alarm rolls back on failure.

Recap

Let's recap. Branches keep work in progress apart from what can be released, and tags label the commit of each release. Pipelines take their source from a repository through a connection, and packages from CodeArtifact. CodePipeline runs stages, with filtered triggers, manual approvals, conditions, and rollbacks. CodeBuild builds from a buildspec, with secrets, reports, and a cache. And Kiro summarizes risks, writes environments, and validates deployments, with people still in charge.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. Every production release must point back to one exact commit, and the release pipeline must start only when a release is labeled. What should the team use?

    • A new repository for each release
    • Git tags, and a trigger filtered on tags
    • A branch named after each developer
    • Manual uploads of each build to S3
    Show the answer

    Git tags, and a trigger filtered on tags

    A Git tag labels the commit of each release, and a trigger filtered on tags starts the pipeline only for them. “A new repository for each release” would copy the code into many repositories, with no link between versions. “A branch named after each developer” would organize work by person, not by release. And “Manual uploads of each build to S3” would bring back manual uploads, with no link to a commit.

  2. Production deployments must wait for the sign-off of a lead developer, who gets an email when the pipeline reaches that point. What should the developer add?

    • A manual approval action, with an SNS topic
    • A trigger filtered on the main branch
    • A rollback on failure for the production stage
    • A report group in CodeBuild
    Show the answer

    A manual approval action, with an SNS topic

    A manual approval action holds the pipeline, and its SNS topic sends the email. “A trigger filtered on the main branch” would choose which pushes start the pipeline, without any sign-off. “A rollback on failure for the production stage” would react to a failure, not wait for a person. And “A report group in CodeBuild” would collect test results, without stopping anything.

  3. After each production deployment, the team wants an automatic check of the main ticket flows, and a rollback when errors rise. What should the developer set up?

    • A manual approval before production
    • A trigger filtered on file paths
    • An upstream repository in CodeArtifact
    • Smoke tests, and a rollback on failure
    Show the answer

    Smoke tests, and a rollback on failure

    Smoke tests check the main flows after the deployment, and the stage rolls back on failure. “A manual approval before production” would add a person before the deployment, not a check after it. “A trigger filtered on file paths” would choose which changes start the pipeline. And “An upstream repository in CodeArtifact” would control where packages come from, without testing the release.