Skip to Content
Cloud Engineering Academy
9. DevOps & CI/CD

CI/CD concepts on AWS: stages, artefacts, environments and where each tool fits

Learn the vocabulary and the shape of a delivery pipeline (build once, promote the same artefact, gate each stage), map every stage to GitHub Actions or the AWS developer tools, and choose between them with a decision rule you can defend to an architecture board.

beginner⏱ 1 h 15 min🟢 FreeDOP-C02DVA-C03

Assumes: .NET 10 LTS · GitHub Actions · AWS CodePipeline V2 · AWS CodeBuild · AWS CodeDeploy · AWS CLI v2 · Region us-east-1. Verified against official sources on 2026-11-18.

Learning objectives

By the end of this lesson you can:

  • Explain the difference between continuous integration, continuous delivery and continuous deployment, and say which one a bank usually runs in production.
  • Draw a pipeline as a sequence of stages with gates, and name the artefact that travels through it.
  • Apply the rule build once, deploy the same bytes everywhere, and show how an image digest makes it checkable.
  • Map each pipeline stage to GitHub Actions, AWS CodeBuild, AWS CodePipeline, AWS CodeDeploy, Amazon ECR or AWS CloudFormation.
  • Choose between GitHub Actions, CodePipeline plus CodeBuild, or a hybrid, using a short decision rule.
  • Run a small C# verification step that proves the running service is the commit the pipeline built.

Prerequisites

  • Git and GitHub for regulated teams — protected branches, pull-request reviews and CODEOWNERS.
  • Module 3: .NET on AWS — containers, ECR and ECS on Fargate.
  • Tools: a terminal, Docker, and either the .NET 10 SDK or the mcr.microsoft.com/dotnet/sdk:10.0 image. No AWS account is needed for this lesson.

Why this matters in banking

Imagine the Harbourline Bank Accounts API has a bug that rounds a balance incorrectly. Support asks: "Which build is in production, who approved it, which tests ran, and how do we put the previous one back?" If the answer is "Dave built it on his laptop and copied the files", the bank has no evidence, no repeatability and no fast rollback.

Delivery pipelines exist to make those answers boring. In a regulated bank they do four jobs at once:

  1. Quality control. Every change goes through the same automated checks.
  2. Security control. Scanning, signing and least-privilege deployment happen in one place that can be audited.
  3. Change-management evidence. The pipeline records who approved what and when.
  4. Operational resilience. Releases are small, frequent and reversible, which is safer than rare, large and scary.

This lesson gives you the shared vocabulary. The rest of the module builds each piece.

The idea in plain language

A pipeline is an automated assembly line that takes a code change from a developer's commit to running in production. It has stages (build, test, scan, deploy), and between stages there are gates: conditions that must be true before the line moves on.

Three terms are often confused:

TermWhat is automatedWho presses the final button
Continuous integration (CI)Merge often; every merge builds and runs the automated testsNobody — CI never deploys to production
Continuous deliveryEvery change that passes the pipeline is ready to releaseA human (or an approval gate) decides when
Continuous deploymentEvery change that passes the pipeline is released automaticallyNobody

Most banks run continuous delivery to production, with continuous deployment to development and test. The manual step is not a failure of automation: it is the segregation of duties control. Your change-management policy decides who may approve, not the tool.

Two more words you need:

  • Artefact: the single thing the pipeline builds and everything downstream consumes. For a container-based .NET service it is a container image stored in Amazon ECR. For a Lambda function it is a zip file or image. For infrastructure it is a CloudFormation template or a Terraform plan.
  • Environment: a place the artefact runs, such as dev, test, staging or prod. In AWS the strongest boundary is a separate AWS account per environment (covered in Environment separation).

Analogy: a pipeline is a sealed-bag cash route. The bag is packed once at the cash centre (build), sealed with a numbered tag (digest), and every checkpoint (test, staging, prod) checks that the tag is intact before opening the next door. Nobody re-packs the bag at a checkpoint, because then the numbered tag would no longer prove what is inside.

The rule that matters most: build once, promote the same artefact

A common anti-pattern is to rebuild the application for each environment, for example dotnet publish in the test job and again in the prod job. The two builds can differ: a newer base image, a package that floated to a new patch version, a different timestamp. What you tested is then not what you shipped.

The rule is:

  1. Build once, in the first stage.
  2. Identify the artefact by a content hash, not a name. For container images that is the digest (sha256:…). A tag such as 1.4.0 is a label someone can move; a digest cannot lie.
  3. Promote the same digest through test, staging and production. Only configuration changes between environments (and configuration comes from the environment, not from the image).

The lab for this module applies the rule literally: the release.yml workflow outputs the image reference as repository@sha256:… and every later job deploys exactly that string.

What problem the AWS services solve

AWS offers a set of developer tools, each covering one stage. You can use them together, mix them with GitHub Actions, or ignore most of them. Know what each one is for:

ServiceWhat it doesTypical limits and sharp edges
AWS CodeConnectionsLets AWS services read your GitHub (or GitLab, Bitbucket) repository through an authorised connectionA connection must be completed once in the console (a human handshake); it starts in a pending state ⚠ VERIFY current naming, as CodeStar Connections was renamed
AWS CodeCommitManaged Git repositories inside AWSClosed to new customers from July 2024, then returned to general availability on 2025-11-24 according to this module's index ⚠ VERIFY on the CodeCommit page before you depend on it. Most teams still choose GitHub
AWS CodeBuildRuns a build in a fresh container (or VM) that you define with a buildspec.yml; billed per build minuteBuilds are ephemeral; caching must be configured; Docker builds need privileged mode
AWS CodePipelineOrchestrates stages: source, build, test, approval, deploy; records every executionOrchestrates other services; it does not build anything itself. V2 pipelines are billed per action-execution minute ⚠ VERIFY current price
AWS CodeDeployShifts traffic to a new version on EC2, on-premises servers, Lambda or ECS, and rolls back on alarmsECS now has native blue/green inside ECS itself; see ECS deployment strategies
Amazon ECRStores and scans container imagesTags are mutable unless you set immutability
AWS CodeArtifactPrivate NuGet, npm, Maven and PyPI repository with upstream proxyingUseful for private shared libraries and for controlling which public packages are allowed
AWS CloudFormation / CDK / TerraformCreate the infrastructure the artefact runs onCovered in Infrastructure automation in the pipeline

Status notes for banks that keep an eye on the vendor. Amazon CodeCatalyst is closed to new customers, AWS Cloud9 is closed to new customers, and Amazon CodeGuru Reviewer is in maintenance (see the module overview for the verified dates). Do not design a new platform around any of them.

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS or GitHub equivalentWhat is different
Azure ReposGitHub (recommended) or CodeCommitThe module uses GitHub; AWS services read it through CodeConnections
Azure Pipelines (YAML), build stageGitHub Actions workflow job, or CodeBuild projectCodeBuild is only the build runner; orchestration is a separate service
Azure Pipelines multi-stage YAMLGitHub Actions jobs with needs, or a CodePipeline pipelineIn CodePipeline the pipeline definition is not YAML in your repository by default; it is a resource you create with IaC
Pipeline artefacts / Azure ArtifactsActions artefacts, CodePipeline artefact store (S3), ECR, CodeArtifactThe pipeline artefact store is an S3 bucket you should encrypt and lock down
Environments with approvals and checksGitHub environments with required reviewers; CodePipeline manual approval actionBoth record who approved; export that record as evidence
Service connection to AzureOIDC federation to an IAM roleNo stored secret; see the next lesson, GitHub Actions with OIDC
Release pipeline with deployment slotsECS blue/green, Lambda aliases, CodeDeployTraffic shifting is driven by health checks and CloudWatch alarms
Azure Monitor alerts gating a releaseCloudWatch alarms attached to the deploymentAlarm-based rollback is a first-class setting on ECS and CodeDeploy

Architecture

The generic pipeline

Where the tools sit

Notice that two orchestrators (GitHub Actions and CodePipeline) can drive the same targets. You normally choose one orchestrator per service, not both.

Security-boundary view

The principle: the further a job is from the production account, the fewer permissions it has. Pull-request code gets none.

Step-by-step implementation

This lesson is a concepts lesson, so the steps are about designing and sanity-checking a pipeline rather than creating AWS resources.

Write the pipeline as a list of questions

For the Accounts API, write down what each stage must prove:

StageQuestion it answersFailing it means
Pull requestHas another person reviewed this, and does it build?Cannot merge
Build and unit testDoes the code compile and do the fast tests pass?Stop; nothing is published
ScanIs a secret, a critical vulnerability or a bad dependency present?Stop; nothing is published
PublishIs the artefact immutable and traceable to a commit?Stop
Test environmentDoes the artefact work with real infrastructure?Do not promote
ApprovalDid the right person, who is not the author, approve?Do not deploy to prod
Production deployIs the new version healthy for real traffic?Roll back automatically

If you cannot state the question, the stage is probably decoration.

Choose the artefact and how it is identified

For the Accounts API: a container image in ECR, immutable tags, identified in deployments by digest. Record the commit SHA inside the image (the lab stamps it into GET /version) so a running container can tell you where it came from.

Separate what changes per environment

List everything that differs between test and prod: database endpoints, log levels, feature flags, secret ARNs. These belong in the environment's configuration (task definition environment, Parameter Store, Secrets Manager), never baked into the image.

Decide the orchestrator

Use the decision rule in the next section. Write the decision and the reasons in one paragraph in your architecture decision record; auditors like a stated reason more than a perfect choice.

Add verification at the end

A deployment is not "done" when the API call returns. It is done when the running system reports the version you expect and its health checks are green. The C# tool below does exactly that.

Decision rule: GitHub Actions, CodePipeline, or both?

QuestionIf yes, lean towards
Is the code already in GitHub and the team lives in pull requests?GitHub Actions
Does the organisation forbid third-party SaaS from running build steps with cloud access?CodePipeline plus CodeBuild (runs inside your AWS account)
Do builds need access to private VPC resources (an internal package feed, a database for integration tests)?CodeBuild in a VPC, or self-hosted runners in your VPC
Do you need a single place where release approvals and execution history live next to the AWS resources they change?CodePipeline
Do you need rich marketplace actions and fast iteration on workflows?GitHub Actions
Is the deployment itself an ECS or Lambda traffic shift with alarms?Either; the traffic shift is done by ECS or CodeDeploy, not by the orchestrator

A hybrid is common and sensible: GitHub Actions for build, test and scan; the AWS-native service for the deployment mechanics. That is the shape of this module's project.

Whichever you pick, keep the pipeline definition in version control, reviewed by CODEOWNERS (the lab's CODEOWNERS requires platform and security teams to approve changes to .github/). A pipeline anyone can edit is a pipeline anyone can use to reach production.

AWS Console instructions

You will see each tool in detail later. For now, find them and notice what they show:

  1. Console → Developer Tools → Settings → Connections (CodeConnections). If you have no connections, the list is empty; that is expected. Do not create one yet.
  2. Console → CodePipeline → Pipelines. Read the "Create pipeline" wizard's first page to see the pipeline types (V1 and V2). Close it without creating anything.
  3. Console → CodeBuild → Build projects. Note that a project is a template for builds, not a build.
  4. Console → CodeDeploy → Applications. Note the compute platforms offered (EC2/on-premises, AWS Lambda, Amazon ECS).
  5. Console → ECR → Repositories. Note Private, Public and Pull through cache tabs.

Navigation labels change from time to time; if one differs, use the service search box at the top of the console.

AWS CLI

These read-only commands list what exists in an account, which is a safe way to explore. Replace the profile if yours differs.

# Who am I? Confirms the SSO session before any other command.
aws sts get-caller-identity --profile learn-sandbox

# List pipelines (empty in a fresh sandbox). Read-only.
aws codepipeline list-pipelines --profile learn-sandbox --region us-east-1

# List CodeBuild projects. Read-only.
aws codebuild list-projects --profile learn-sandbox --region us-east-1

# List CodeConnections connections. Read-only. (The CLI namespace is codeconnections;
# older accounts may still use codestar-connections.)  ⚠ VERIFY the namespace in your CLI version.
aws codeconnections list-connections --profile learn-sandbox --region us-east-1

# List CodeDeploy applications. Read-only.
aws deploy list-applications --profile learn-sandbox --region us-east-1

# List ECR repositories with their immutability and scan settings. Read-only.
aws ecr describe-repositories \
  --query "repositories[].{name:repositoryName,tags:imageTagMutability,scan:imageScanningConfiguration.scanOnPush}" \
  --profile learn-sandbox --region us-east-1

Infrastructure as Code

A pipeline can itself be code. This minimal CodePipeline V2 skeleton shows the shape (source from GitHub through a connection, a build action, a manual approval). The full, working pipeline is built in CodeBuild, CodePipeline and CodeDeploy; here the point is that stages and gates are resources you can review.

PipelineSkeletonStack.cs
using Amazon.CDK;
using Amazon.CDK.AWS.CodePipeline;
using Amazon.CDK.AWS.CodePipeline.Actions;
using Constructs;

namespace Harbourline.Pipelines;

public class PipelineSkeletonStack : Stack
{
    public PipelineSkeletonStack(Construct scope, string id, string connectionArn, IStackProps? props = null)
        : base(scope, id, props)
    {
        var source = new Artifact_("Source");

        var pipeline = new Pipeline(this, "AccountsApi", new PipelineProps
        {
            PipelineName = "hl-accounts-api-skeleton",
            PipelineType = PipelineType.V2,
            ExecutionMode = ExecutionMode.QUEUED,
        });

        pipeline.AddStage(new StageOptions
        {
            StageName = "Source",
            Actions = new IAction[]
            {
                new CodeStarConnectionsSourceAction(new CodeStarConnectionsSourceActionProps
                {
                    ActionName = "GitHub",
                    Owner = "harbourline-learn",
                    Repo = "accounts-api",
                    Branch = "main",
                    ConnectionArn = connectionArn,
                    Output = source,
                }),
            },
        });

        pipeline.AddStage(new StageOptions
        {
            StageName = "Approve",
            Actions = new IAction[]
            {
                new ManualApprovalAction(new ManualApprovalActionProps
                {
                    ActionName = "ProdApproval",
                    AdditionalInformation = "Change ticket and test evidence must be attached.",
                }),
            },
        });

        Amazon.CDK.Tags.Of(this).Add("Project", "cea-lab");
        Amazon.CDK.Tags.Of(this).Add("Lab", "m09-concepts");
    }
}

The class names Artifact_ and CodeStarConnectionsSourceAction are the C# spellings in current CDK v2 ⚠ VERIFY against your Amazon.CDK.Lib version, because construct names around CodeConnections have been renamed in some languages.

Complete code

The most valuable last step of any pipeline is a check that the running system is the one you built. This is a runnable single-file C# program (.NET 10 supports running a .cs file directly). It polls GET /version until the service reports the expected commit, then exits 0; otherwise 1. The Accounts API in labs/m09-delivery-pipeline exposes exactly this endpoint.

VerifyDeployed.cs
// Usage: dotnet run VerifyDeployed.cs -- <base-url> <expected-commit> [attempts] [delay-seconds]
// Exit codes: 0 = the running service reports the commit we built, 1 = mismatch or unreachable, 2 = usage.
using System.Text.Json;

if (args.Length < 2)
{
    Console.Error.WriteLine("usage: VerifyDeployed <base-url> <expected-commit> [attempts] [delay-seconds]");
    return 2;
}

var baseUrl = args[0].TrimEnd('/');
var expected = args[1].Trim().ToLowerInvariant();
var attempts = args.Length > 2 ? int.Parse(args[2]) : 10;
var delay = TimeSpan.FromSeconds(args.Length > 3 ? int.Parse(args[3]) : 6);

using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
string? lastSeen = null;

for (var attempt = 1; attempt <= attempts; attempt++)
{
    try
    {
        var json = await http.GetStringAsync($"{baseUrl}/version");
        using var doc = JsonDocument.Parse(json);
        lastSeen = doc.RootElement.GetProperty("commit").GetString()?.ToLowerInvariant();
        if (lastSeen == expected)
        {
            Console.WriteLine($"OK: {baseUrl} runs commit {expected[..7]} (attempt {attempt}).");
            return 0;
        }

        Console.WriteLine($"attempt {attempt}/{attempts}: service reports {lastSeen?[..Math.Min(7, lastSeen.Length)] ?? "nothing"}, expected {expected[..7]}");
    }
    catch (Exception ex) when (ex is HttpRequestException or TaskCanceledException or JsonException or KeyNotFoundException)
    {
        Console.WriteLine($"attempt {attempt}/{attempts}: {ex.GetType().Name}: {ex.Message}");
    }

    if (attempt < attempts)
    {
        await Task.Delay(delay);
    }
}

Console.Error.WriteLine($"FAIL: {baseUrl} did not report commit {expected}. Last seen: {lastSeen ?? "none"}.");
return 1;

Try it against the lab API running locally:

# Terminal 1 (from labs/m09-delivery-pipeline): run the API with a known commit
docker build --build-arg VERSION=1.0.0 --build-arg GIT_SHA=3f9c2ab1d4e5f60718293a4b5c6d7e8f90a1b2c3 -t hl-m09-accounts-api:dev .
docker run --rm -p 8080:8080 hl-m09-accounts-api:dev

# Terminal 2: verify
dotnet run VerifyDeployed.cs -- http://localhost:8080 3f9c2ab1d4e5f60718293a4b5c6d7e8f90a1b2c3 3 2

A minimal GitHub Actions workflow that expresses the generic pipeline (no AWS yet, so it is free and safe) is below. The real version in the lab adds scanning, OIDC and approvals.

.github/workflows/minimal-ci.yml
name: minimal-ci
on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

permissions:
  contents: read   # the token can read the code and nothing else

jobs:
  build-test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
        with:
          global-json-file: global.json
      - run: dotnet build DeliveryPipeline.slnx -c Release
      - run: dotnet test --solution DeliveryPipeline.slnx -c Release --no-build

Code explained line by line

VerifyDeployed.cs

  1. if (args.Length < 2) — a single-file program receives its arguments in args. Two are required, so a typo fails fast with exit code 2, which the pipeline can tell apart from a real mismatch.
  2. expected = ... ToLowerInvariant() — Git SHAs are hexadecimal; normalising case avoids a false mismatch.
  3. attempts and delay — deployments are not instantaneous. ECS needs time to start tasks and shift traffic, so the check retries rather than failing on the first call.
  4. HttpClient { Timeout = 10 s } — never leave a pipeline step without a timeout; a hung request would otherwise hold a runner until the job timeout.
  5. JsonDocument.Parse and GetProperty("commit") — reads the field the API publishes. JsonDocument is disposable, hence using.
  6. catch (Exception ex) when (...) — only expected failures are retried (network, timeout, malformed body, missing field). Anything else, such as an OutOfMemoryException, is a real bug and should crash the step.
  7. return 0/1/2 — top-level statements can return an exit code; CI tools decide pass or fail from it.

minimal-ci.yml

  1. permissions: contents: read — a workflow-level default that denies the token every other permission.
  2. persist-credentials: false — the checkout does not leave the token in .git/config, so later steps cannot reuse it by accident.
  3. uses: …@<40-character SHA> # v7.0.1 — the action is pinned to an exact commit; the comment records the human-readable version. Why this matters is explained in the pipeline security lesson.
  4. --no-build on the test step — the test step reuses the build output, which keeps "build once" true even inside a single job.

Security considerations

⚠ Learning shortcut — not for production

The skeleton pipeline attaches no permissions to its role and uses force_destroy on the artefact bucket so you can delete it easily. A production pipeline's service role is scoped to the exact bucket, connection and deploy targets it needs, the artefact bucket is encrypted with a customer managed KMS key and blocks public access, and its bucket policy denies any principal except the pipeline. Never ship a pipeline role with AdministratorAccess "to get it working".

  • A pipeline is a privileged identity. Whoever can change the pipeline can reach every environment it deploys to. Protect the pipeline definition like production code.
  • Pull-request code is untrusted. Give PR workflows no cloud credentials and no secrets. This is the single most important rule.
  • Prefer short-lived credentials. OIDC federation (next lesson) replaces stored access keys with credentials that expire within an hour.
  • Record, do not just log. Logs scroll away. Keep the run URL, digest, approver and scan results as a release record (Release management and audit evidence).
  • Compliance. This lesson does not make a pipeline compliant with anything. Control mappings (for example to PCI DSS change-management requirements or your internal policy) are decisions for your compliance, risk and audit teams.

Banking use case

Harbourline's mobile-banking team ships the Accounts API twice a week. Their pipeline is continuous delivery:

  • Every pull request needs one approving review from a code owner and green CI. Direct pushes to main are blocked.
  • Merging to main builds the image once, scans it and pushes it to ECR with an immutable tag.
  • The same digest is deployed automatically to the test account, where integration and smoke tests run.
  • Production needs an approval from someone who did not write or merge the change, and a change ticket reference (for example CHG-104233, fictional).
  • Production uses a blue/green deployment with CloudWatch alarms; a failed health check rolls back automatically.
  • The pipeline writes a release record to an append-only evidence bucket.

When internal audit asks "show me three random releases from last quarter", the team exports three records rather than reconstructing events from chat history.

Common mistakes

  • Rebuilding per environment → results are not comparable → build once and promote the digest.
  • Using the latest tag → nobody knows what is running → use commit-based and version tags, and deploy by digest.
  • Baking configuration into the image → every environment needs its own build → read configuration from the environment.
  • Giving CI jobs production credentials "for convenience" → one compromised dependency reaches production → separate roles per stage.
  • Treating approval as decoration → the approver is the author → enforce that the approver differs from the author in the release policy.
  • No verification after deploy → "deployed" means "the API call returned" → check the running version and health.
  • One giant pipeline nobody understands → changes become risky → keep stages small and named by the question they answer.

Troubleshooting

SymptomLikely causeFix
VerifyDeployed.cs prints Connection refusedContainer not started, or wrong portCheck docker ps; the lab API listens on 8080 inside the container
Verification reports an older commitDeployment still in progress, or traffic not shiftedIncrease attempts; check the ECS deployment status
dotnet run VerifyDeployed.cs says it cannot find a projectOlder SDK without file-based app supportUse .NET 10 SDK, or the mcr.microsoft.com/dotnet/sdk:10.0 image
CodePipeline source action stays PendingCodeConnections connection not authorisedComplete the connection handshake once in the console
aws codeconnections command not foundOlder AWS CLI v2Update the CLI, or use the codestar-connections namespace ⚠ VERIFY
A GitHub workflow does not start on pushWorkflow file not on the default branch, or path filters exclude the changeMerge the workflow to main; check on: filters

Cost and cleanup

Cost: free. The lesson creates no AWS resources. GitHub Actions is free for public repositories and has a monthly allowance for private ones ⚠ VERIFY current minutes. The skeleton IaC is for reading: do not apply it unless you also complete the CodePipeline lesson, where cost and teardown are explained (CodePipeline V2 is billed per action-execution minute, with a small monthly free allowance ⚠ VERIFY).

Local cleanup:

# Stop and remove the local container if still running, and the dev image
docker rm -f $(docker ps -q --filter ancestor=hl-m09-accounts-api:dev) 2>/dev/null
docker rmi hl-m09-accounts-api:dev

Exercises

  • 🟢 Guided: Write the "list of questions" table for a pipeline that deploys a Lambda function (stages, the question each answers, and what failing means). Name the artefact and how it is identified.
  • 🟡 Challenge: Take the minimal workflow and add a second job, publish, that only runs on main, needs the first job, and uploads the build output as a workflow artefact. Explain in two sentences why publish does not rebuild.
  • 🔴 Live problem: Your head of engineering says "we deploy straight from the developers' IDE because the pipeline is slow, and we have a production incident every month." Write a one-page proposal that keeps the team's speed, names the first three pipeline stages you would build, and states which controls you would make non-negotiable. Include what you would measure after one month.

Assignment

Create docs/delivery-design.md in your portfolio repository describing the delivery pipeline for the Accounts API: stage list with the question each stage answers, the artefact and how it is identified, which tool you chose for orchestration and why (use the decision rule), and a diagram of the trust zones. One page, no code.

Solutions

Knowledge check

Interview questions

  • "Walk me through a pipeline you would design for a payments API." Pull request with review and CI; build once; scan; publish an immutable image by digest; deploy to test automatically; approval by someone other than the author for prod; blue/green with alarm rollback; a release record. Mention which controls are non-negotiable and why.
  • "GitHub Actions or CodePipeline?" It depends on where the code and the runners must live. A strong answer states a decision rule (code location, network access to private resources, where approvals must be recorded) and notes that a hybrid is normal.
  • "What does 'build once' mean and why does it matter?" The same artefact, identified by digest, is promoted across environments, so tests prove what ships.
  • "How do you know what is running in production?" The service reports its commit and release identifier; the pipeline verifies it after deploy; deployment history and the release record agree.
  • "What would you not automate?" Production approval, where policy requires a human who is not the author; and the decision to accept a vulnerability risk.

Certification practice

Completion checklist

  • I can explain delivery versus deployment in two sentences
  • I can state why the artefact is built once and identified by digest
  • I completed the guided exercise
  • I ran VerifyDeployed.cs against the local container
  • I removed the local container and image

Key takeaways

  • A pipeline is stages plus gates; each stage should answer a stated question.
  • Build once, promote the same digest. Only configuration differs per environment.
  • Orchestration (GitHub Actions or CodePipeline) and execution (runner or CodeBuild) and deployment mechanics (ECS or CodeDeploy) are separate jobs; a hybrid is normal.
  • The further a job is from production, the fewer permissions it holds; pull-request code holds none.
  • A deployment is finished when the running system proves its version and health, and a release record exists.

Further reading

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page