Module 9 cheat sheet
One-page revision summary for DevOps & CI/CD: services, Azure DevOps mapping, commands, limits and defaults, decision rules, exam traps and cost traps.
Assumes: AWS CLI v2 · GitHub Actions · CodePipeline V2 · .NET 10 LTS · Region us-east-1 · facts as stated in the Module 9 lessons; items marked VERIFY there are not repeated as certain here. Verified against official sources on 2026-11-18.
A printable summary of Module 9. Each row links back to the lesson with the detail. Source control in this module is GitHub, connected to AWS services through CodeConnections; AWS CodeCommit is optional (see the module overview for its availability history).
Key services
| Service | What it is for |
|---|---|
| GitHub rulesets, CODEOWNERS, environments | Protected main, required reviews, required checks, approval gates (see Git and GitHub) |
| GitHub Actions | Workflow runner; assumes AWS roles with OIDC, no stored keys |
| IAM OIDC provider + roles | Short-lived credentials via AssumeRoleWithWebIdentity, scoped by trust policy |
| CodeConnections | Lets CodePipeline and CodeBuild read a GitHub repository |
| CodeBuild | Runs buildspec.yml in a container; builds and tests |
| CodePipeline (V2) | Orchestrates source, build, approval and deploy stages |
| CodeDeploy | Traffic shifting for Lambda aliases (and the older ECS controller) with hooks and alarms |
| Amazon ECR | Image registry: immutable tags, scan on push, lifecycle policy |
| ECS deployment strategies | ROLLING, BLUE_GREEN, LINEAR, CANARY with alarms and circuit breaker |
| Secrets Manager / Parameter Store | Runtime secrets, fetched by the app, not by the pipeline |
.NET / Azure DevOps → AWS
| Microsoft / Azure | AWS |
|---|---|
| Azure Repos + branch policies | GitHub rulesets + CODEOWNERS (or CodeCommit approval rule templates) |
| Azure Pipelines YAML | GitHub Actions workflow, or CodePipeline + CodeBuild |
| Service connection with a secret | OIDC provider + IAM role, no secret |
| Environments with approvals | GitHub environments with required reviewers, or CodePipeline manual approval |
| App Service deployment slots | ECS BLUE_GREEN with bake time; Lambda alias with weighted traffic |
| Variable groups / Key Vault link | Environment secrets / Secrets Manager / Parameter Store |
| Azure Artifacts / ACR | CodeArtifact / ECR |
| Subscription per environment | AWS account per environment under Organizations |
Most useful commands
| Task | Command |
|---|---|
| Who am I (which role did the pipeline get)? | aws sts get-caller-identity |
| List OIDC providers | aws iam list-open-id-connect-providers |
| Show a role's trust policy | aws iam get-role --role-name NAME --query Role.AssumeRolePolicyDocument |
| Image digest for a tag | aws ecr describe-images --repository-name REPO --image-ids imageTag=TAG --query 'imageDetails[0].imageDigest' --output text |
| Scan findings | aws ecr describe-image-scan-findings --repository-name REPO --image-id imageTag=TAG |
| Start a pipeline | aws codepipeline start-pipeline-execution --name NAME |
| Approve a manual stage | aws codepipeline put-approval-result ... |
| Start a CodeBuild build | aws codebuild start-build --project-name NAME |
| Watch an ECS deployment | aws ecs describe-services --cluster C --services S |
| Publish a Lambda version | aws lambda publish-version --function-name FN |
| Move an alias | aws lambda update-alias --function-name FN --name live --function-version N |
| Offline trust-policy proof (lab) | dotnet run --project src/Harbourline.Delivery -- trust-eval POLICY.json CLAIMS.json |
| Leftovers after a lab | aws resourcegroupstaggingapi get-resources --tag-filters Key=Lab,Values=m09-delivery-pipeline |
Key limits and defaults
| Item | Value | Lesson |
|---|---|---|
| GitHub OIDC provider URL / audience | https://token.actions.githubusercontent.com / sts.amazonaws.com | GitHub Actions with OIDC |
| Thumbprint for the GitHub provider | Not needed; IAM validates the certificate chain | GitHub Actions with OIDC |
| Workflow permission for the token | permissions: id-token: write | GitHub Actions with OIDC |
OIDC sub forms | repo:O/R:environment:prod, repo:O/R:ref:refs/heads/main, repo:O/R:pull_request | GitHub Actions with OIDC |
| Role session | 1 hour by default (configurable up to the role maximum) | GitHub Actions with OIDC |
| ECR tag immutability | A tag cannot be re-pointed; bump the version | Docker and ECR |
| ECR scanning | Basic on push (included); enhanced via Inspector (billed) | Docker and ECR |
| Circuit breaker | Rolling updates only | ECS strategies |
BLUE_GREEN | You must set bakeTimeInMinutes | ECS strategies |
| Lambda canary configs | e.g. CodeDeployDefault.LambdaCanary10Percent5Minutes, LambdaLinear10PercentEvery1Minute, LambdaAllAtOnce | Lambda deployments |
permissions: block | A job that sets it replaces the defaults entirely | Pipeline security |
Decision rules
| If… | Then… |
|---|---|
| Code is on GitHub and you want one tool | GitHub Actions + OIDC |
| Policy requires AWS-native orchestration | CodePipeline V2 + CodeBuild, source via CodeConnections |
| Need to promote to prod safely | Build once, deploy the same image digest to each environment |
| Stateless internal API | ROLLING + circuit breaker + alarms |
| Customer-facing or payments API | BLUE_GREEN or CANARY with bake time and alarm rollback |
| Lambda release | Version + alias + CodeDeploy canary with hooks and alarms |
| Fastest back-out of new behaviour | Feature flag, then code rollback |
| Schema change | Expand, migrate, contract across separate releases; never a destructive change in the same release |
| Pipeline needs AWS access | OIDC role per repository and environment; no long-lived keys |
| Runtime secret | App reads it from Secrets Manager; the pipeline never holds it |
| Infra change | Plan on PR with a read-only role; apply only from main after environment approval, applying the reviewed plan |
| Segregation of duties | Release policy check blocks when the approver is the author |
Common exam traps
- A tag is not an identity: deploy by digest; mutable tags such as
latestcan change under you. - A trust policy without a
subcondition lets any repository using GitHub's provider assume the role; always pinaudandsub. - Wildcards in
sub(StringLike) are the usual mistake:repo:org/*trusts every repository. - Fork and pull-request jobs must hold no cloud role; avoid
pull_request_targetwith untrusted code. - Circuit breaker is rolling-only; traffic-shifting strategies rely on health checks, hooks and alarms.
- Rollback cannot undo data: only backward-compatible (expand/contract) changes roll back safely.
- Lambda alias traffic is weighted between two versions and only published versions are immutable;
$LATESTis mutable. - CodePipeline V2 is billed per action minute (see the CodeBuild lesson for V1 versus V2).
- CodeCommit availability changed over time; GitHub with CodeConnections is the default in this course.
- Pinning actions means a full commit SHA, not
@v4.
Cost traps
| Trap | Avoid it by |
|---|---|
| ALB and Fargate left running after a blue/green lab | Deploy, test and destroy within an hour; tag everything and list by tag |
| Both blue and green running longer than needed | Short bake time in labs |
| ECR images accumulating | Lifecycle policy; delete the repository after the module |
| ECR enhanced scanning (Inspector) | Use basic scanning for labs |
| CodePipeline V2 action minutes and CodeBuild minutes | Treat Lab 9.6 as optional; small compute type |
| Private-repository Actions minutes | Use a public repository or watch the monthly allowance |
| Evidence bucket versions kept forever | Lifecycle rules; Object Lock only where policy needs it |
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.
Module project: complete CI/CD for an ASP.NET Core API
Build, scan and sign off a release of the Harbourline Accounts API end to end: OIDC everywhere, one image built once and deployed by digest to test and then, after a human approval and a release-policy check, to production with ECS blue/green and alarm rollback, ending in an append-only evidence pack.
Module 10: Infrastructure as Code
Define whole AWS environments as reviewable code with CloudFormation, the AWS CDK in C# and Terraform. You learn state, drift, testing and policy-as-code, then build the same banking environment twice, in CDK and in Terraform, and deploy, change, detect drift and destroy it.