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

Module 9: DevOps & CI/CD

Move from Azure DevOps pipelines to AWS-ready delivery: GitHub Actions with OIDC (no stored AWS keys) or CodePipeline, CodeBuild and CodeDeploy. You build a pipeline that tests, scans and deploys an ASP.NET Core API with blue/green releases, production approval and automatic rollback, producing the audit evidence banks require.

DOP-C02DVA-C03

Assumes: .NET 10 LTS · GitHub Actions · AWS CodePipeline V2 · Testcontainers.LocalStack 4.17.0 · Region us-east-1. Verified against official sources on 2026-11-18.

Move from Azure DevOps pipelines to AWS-ready delivery: GitHub Actions with OIDC (no stored AWS keys) or CodePipeline, CodeBuild and CodeDeploy. You build a pipeline that tests, scans and deploys an ASP.NET Core API with blue/green releases, production approval and automatic rollback, producing the audit evidence banks require.

Estimated timeAbout 18 hours (lessons 10 h · labs 4 h · project 4 h)
Priority for youHigh — priority 1 (getting .NET deployed safely and repeatably)
LevelIntermediate → advanced
CertificationsDOP-C02 (primary) · DVA-C03
Cost profile🟢 GitHub Actions + local tests · 🟡 CodeBuild/CodePipeline and Fargate deploys · 🔴 none required

Why this matters in banking

In a bank, "it works on my machine" is not a release process. Change-management boards want to know who approved a release, which tests ran, which vulnerabilities were accepted and how quickly you can roll back. Long-lived AWS access keys stored in a CI tool are one of the most common causes of cloud breaches. A good pipeline is therefore a security and audit control, not just a convenience: it enforces segregation of duties, produces evidence automatically and makes rollback boring. This module shows how to build one that would survive an internal-audit review.

From .NET/Azure to AWS

You know (Microsoft/Azure)AWS equivalentWhat's different
Azure ReposGitHub (used in this module), with AWS services reading it through CodeConnections; AWS CodeCommit is the IAM-native alternativeCodeCommit was closed to new customers in 2024 and returned to general availability on 2025-11-24; most teams still use GitHub
Azure Pipelines (YAML)GitHub Actions or AWS CodePipeline + CodeBuildCodePipeline orchestrates stages; CodeBuild runs the build containers
Service connection with a secretGitHub OIDC → IAM role (AssumeRoleWithWebIdentity)Short-lived credentials per job; nothing to rotate or leak
Release pipeline approvals / environmentsGitHub environments with required reviewers, or CodePipeline manual approvalApproval history becomes audit evidence
Deployment slots (App Service)ECS blue/green, Lambda aliases with weighted traffic, CodeDeployTraffic shifting is driven by health checks and alarms
Azure Artifacts / ACRCodeArtifact / Amazon ECRPin dependencies and scan images before deploy
Variable groups linked to Key VaultGitHub environment secrets / Secrets Manager / Parameter StoreKeep deploy-time secrets out of logs and repos

Learning objectives

By the end of this module you can:

  • Set up a Git branching strategy with pull-request reviews and protected branches suitable for a regulated team.
  • Configure GitHub Actions to assume a least-privilege IAM role through OIDC, scoped to one repository and environment.
  • Build, test and package a .NET 10 API, then push a signed, scanned image to ECR.
  • Run unit, integration (Testcontainers), contract, end-to-end and load tests at the right pipeline stage.
  • Deploy to ECS with rolling, blue/green and canary strategies, and to Lambda with aliases and weighted traffic.
  • Wire automatic rollback to health checks and CloudWatch alarms, and rehearse a manual rollback.
  • Separate dev, test, staging and prod into separate AWS accounts and produce change-approval and release evidence.

Prerequisites

How the pieces fit

Lessons

  1. Git and GitHub for regulated teams — branching strategies, PR reviews, CODEOWNERS, rulesets and protected branches.
  2. CI/CD concepts on AWS — pipeline stages, artefacts, environments and where AWS-native tools fit next to GitHub Actions.
  3. GitHub Actions with OIDC — the IAM OIDC provider, trust-policy conditions on repository and environment, and no stored AWS keys.
  4. AWS CodeBuild, CodePipeline and CodeDeploy — buildspecs, pipeline stages, manual approvals and deployment groups, with GitHub connected through CodeConnections.
  5. Docker and Amazon ECR in pipelines — reproducible builds, tagging, scan on push and pushing with a narrowly scoped role.
  6. Automated testing strategy — unit, integration with Testcontainers (LocalStack module), contract, end-to-end and load testing.
  7. Lab 9.1: a CI workflow with Testcontainers and LocalStack — the hands-on checkpoint for lessons 1 to 6.
  8. ECS deployment strategies — rolling updates, blue/green and canary, deployment circuit breaker and alarm-based rollback.
  9. Lambda deployments — versions, aliases, weighted traffic shifting and pre/post-traffic hooks.
  10. Rollback strategies — automatic vs manual, database changes that cannot be rolled back, and expand/contract migrations.
  11. Environment separation — dev/test/staging/prod in separate AWS accounts and cross-account deploy roles.
  12. Lab 9.2: an OIDC deploy role that a fork cannot assume — the hands-on checkpoint for lessons 3 and 11.
  13. Secrets in CI/CD — GitHub environment secrets vs Secrets Manager, masking and keeping secrets out of build logs.
  14. Pipeline security — least-privilege deploy roles, pinned actions and dependencies, signed artefacts and SBOMs.
  15. Infrastructure automation in the pipeline — running CDK or Terraform plans with approval gates.
  16. Release management and audit evidence — change approval, release notes, traceability from ticket to commit to deployment.
  17. Module project: complete CI/CD for an ASP.NET Core API — ties everything together and also covers Labs 9.3, 9.5 and 9.6.

Labs and module project

All lab code is in labs/m09-delivery-pipeline/ (75 tests: 74 pass without an AWS account, 1 LocalStack test is skipped unless Docker and LocalStack are available). Copy that folder's contents to the root of your own GitHub repository to run the workflows.

  • Lab 9.1 (🟢) — GitHub Actions workflow that builds and tests the .NET API, with integration tests using Testcontainers.LocalStack 4.17.0.
  • Lab 9.2 (🟢) — Create an IAM OIDC provider and a deploy role limited to one repository and environment; prove a fork cannot assume it.
  • Lab 9.3 (🟢) — Add secrets, dependency and container-image scanning plus SBOM generation; fail the build on critical findings. Inside the module project; the workflow is security.yml.
  • Lab 9.4 (🟡) — Blue/green ECS deployment with alarm-based rollback; break the health check on purpose and watch it roll back. Destroy afterwards. Taught in ECS deployment strategies and run in Part 4 of the module project.
  • Lab 9.5 (🟢) — Lambda alias with 10% canary traffic and automatic rollback on errors. Design and CLI walkthrough in the module project, building on Lambda deployments.
  • Lab 9.6 (🟡) — Optional: the same pipeline in CodePipeline + CodeBuild, for comparison. In the module project, using buildspec.yml.

Module project — complete CI/CD for an ASP.NET Core Web API. A pipeline that builds, tests, scans and deploys the Module 3 API to AWS, using OIDC throughout, separate test and prod environments, a manual approval for production and automatic rollback on failed health checks. Export the run history, approvals and scan reports as a release-evidence pack.

When you finish, keep the Module 9 cheat sheet handy for revision.

Cost profile

PartLabelFree alternative
GitHub Actions builds and tests🟢 freeFree for public repositories; private repositories include a monthly minute allowance ⚠ VERIFY current allowance
OIDC provider and IAM roles🟢 freeNo charge for IAM
ECR image storage🟡 creditsLifecycle policy to keep only the last few images; delete the repository after the module
ECS blue/green deploys (Fargate + ALB)🟡 creditsDeploy, test and destroy within an hour
Lambda canary deployments🟢 freeWithin the always-free allowance
CodePipeline / CodeBuild🟡 creditsOptional comparison lab; otherwise design-only

Certification alignment

ExamDomains (weight)What this module covers
DOP-C02SDLC (22%) · Security (17%) · Resilience (15%)Pipelines, testing, deployment strategies, rollback and pipeline security
DVA-C03Test & Deploy (22%)CodeBuild, CodeDeploy, Lambda aliases, ECS deployments

The domain labels are short forms; see each exam page for the official wording.

Service availability notes

Developer tools that changed — verified 2026-11-17

AWS CodeCommit returned to full general availability on 2025-11-24 and accepts new customers again (it had been closed to new customers since July 2024). Some AWS pages may still show the older notice.

AWS Cloud9 has been closed to new customers since 2024-07-25. Use the AWS Toolkit for Visual Studio, VS Code or Rider, or AWS CloudShell.

Amazon CodeCatalyst is in maintenance and closed to new customers (2025-11-07).

Amazon CodeGuru Reviewer is in maintenance (announced 2025-10-07). Use open-source SAST tools in the pipeline instead.

AWS Systems Manager Change Manager is in maintenance (2025-11-07). Model change approval with pipeline approvals and GitHub environment protection rules.

Segregation of duties

Whether one person may both merge and approve a production release, and what counts as acceptable release evidence, is set by your bank's change-management policy. Agree it with risk and audit before you automate it.

Key AWS services

AWS Identity and Access Management (OIDC providers, roles) · AWS STS · AWS CodePipeline · AWS CodeBuild · AWS CodeDeploy · AWS CodeCommit · AWS CodeArtifact · Amazon ECR · Amazon ECS · AWS Lambda (versions, aliases) · Amazon CloudWatch alarms · AWS Secrets Manager · GitHub Actions (third-party)

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