Skip to Content
Cloud Engineering Academy
1. Cloud Computing & AWS Fundamentals

IaaS, PaaS and SaaS

Tell the cloud service models apart, place AWS and Azure services on the spectrum from virtual machines to serverless, and choose a model for a banking workload by what you are willing to operate.

beginnerโฑ 55 min๐ŸŸข FreeCLF-C02SAA-C03

Assumes: .NET 10 LTS ยท AWS SDK for .NET v4 ยท Amazon.Lambda.Core 3.4.0 ยท AWS CLI v2 ยท Region us-east-1. Verified against official sources on 2026-11-17.

Learning objectives

By the end of this lesson you can:

  • Define Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) and say who manages each layer of the stack in each model.
  • Place containers and serverless / Functions as a Service (FaaS) on the same spectrum and explain why AWS calls Lambda and Fargate "serverless".
  • Map common AWS services (EC2, Elastic Beanstalk, ECS on Fargate, Lambda, RDS, Amazon Connect) and their Azure counterparts to a service model.
  • Choose a model for a banking workload by weighing control, operational effort, cost shape and compliance evidence.
  • Keep your C# business logic independent of the hosting model, so moving between models is cheap.

Prerequisites

Why this matters in banking

Harbourline Bank's architecture review board meets every Tuesday. In one month it sees four proposals:

  1. A vendor's anti-money-laundering (AML) case-management product that only installs on Windows Server.
  2. A new customer-facing Accounts API written in ASP.NET Core.
  3. A function that renders a PDF statement whenever a statement file lands in storage.
  4. A replacement for the contact-centre telephony platform.

Each team says "we'll put it in the cloud". But "the cloud" is not one thing. The vendor product needs a full operating system the bank patches itself; the API wants a platform that runs containers; the statement renderer is a perfect short-lived function; and telephony is best bought as a finished service. Choosing the wrong model has real consequences: a team that picks raw virtual machines for a 200-line function inherits patching, scaling and hardening work forever; a team that forces a Windows-only product into a function platform simply fails. And for the bank's risk team, the model changes the evidence they need โ€” who patches the operating system, who holds the encryption keys, who can see the data.

The idea in plain language

Every running application sits on a stack of layers: the building and power, the physical servers, storage and network, a virtualisation layer, an operating system, a runtime (such as .NET), the application code, and the data. The service models answer one question: which of those layers do you manage, and which does the provider manage?

  • IaaS โ€” you rent the infrastructure. The provider gives you virtual servers, disks and networks. You install and patch the operating system, the runtime and everything above. Maximum control, maximum work.
  • PaaS โ€” you rent a platform. The provider runs the operating system and runtime; you deploy your application and configure it. Less control, much less work.
  • SaaS โ€” you rent the finished application. You configure it and put your data in it; the provider runs everything else.

Analogy: Think of opening a new Harbourline branch. IaaS is leasing an empty shell of a building: the landlord provides walls, power and a roof; you fit out the counters, install the safes, hire the security guard. PaaS is a serviced office: furniture, reception, cleaning and IT network are provided; you bring your staff and your processes. SaaS is paying another firm to run the service for you entirely โ€” like outsourcing your cash-in-transit to a specialist: you agree the service levels and hand over the cash, and they run the vans. In every case you are still responsible for the customers' money โ€” the data.

The responsibility stack

LayerOn premisesIaaS (e.g. EC2)Containers on a managed platform (e.g. ECS on Fargate)FaaS (e.g. Lambda)PaaS app platform (e.g. Elastic Beanstalk)SaaS (e.g. Amazon Connect)
Data and who can access itYouYouYouYouYouYou
Application codeYouYouYouYouYouProvider
Application configurationYouYouYouYouYouYou (settings, users)
Runtime (.NET)YouYouYou (inside your image)Provider (managed runtime)Provider (platform version, you choose when to update)Provider
Operating systemYouYouYou for the image contents; provider for the hostProviderProvider manages the platform; instances are in your accountProvider
Virtualisation, servers, storage, network hardwareYouProviderProviderProviderProviderProvider
Data centre, power, physical securityYouProviderProviderProviderProviderProvider

Two things to notice. First, the top row never moves: whatever the model, the bank decides who can see customer data and how it is protected. Second, the line between "PaaS" and "IaaS" on AWS is blurry: Elastic Beanstalk, for example, manages the platform for you, but the EC2 instances it creates live in your account and you can see and change them. Treat the models as a spectrum, not three boxes.

Where containers and serverless fit

Two newer ideas sit between IaaS and SaaS:

  • Containers package your application with its runtime and libraries into an image (think of a Docker image built from your Dockerfile). You can run containers on virtual machines you manage (IaaS-like) or on a managed platform. On AWS, Amazon ECS (Elastic Container Service) and Amazon EKS (Elastic Kubernetes Service) orchestrate containers; AWS Fargate runs them without you managing any servers.
  • Serverless means you do not provision or manage servers at all, you pay for what you use, and scaling is built in. There are still servers โ€” you just never see them. AWS Lambda is AWS's Functions as a Service (FaaS) offering: you upload a function, AWS runs it in response to events (an HTTP request, a file arriving in S3, a message on a queue), and you pay per request and per millisecond of compute. Lambda has a managed .NET 10 runtime (dotnet10).

AWS uses the word serverless for much more than Lambda โ€” Fargate, S3, DynamoDB, SQS and API Gateway are all described as serverless because there is no server for you to size or patch.

Honest trade-offs

ModelStrengthsWeaknessesTypical banking fit
IaaSFull control of OS and software; runs almost anything, including vendor products and Windows-only software; easiest lift-and-shiftYou patch, harden, back up and scale; more audit evidence to produce; easy to over-provisionVendor packages, legacy Windows services, software with OS-level licensing or agents
Containers on Fargate / ECSSame image runs locally and in AWS; no hosts to patch; good for long-running APIsYou own the image (base image patching, vulnerability scanning); some platform limitsASP.NET Core APIs, background workers
FaaS (Lambda)No servers, scales to zero, pay per request, event-driven integrationMaximum execution time per invocation (15 minutes), cold starts, packaging limits, different local debuggingEvent handlers, file processing, glue code, low-traffic APIs
PaaS app platform / managed databasesPlatform patching and scaling handled; fast to adoptLess control over versions and tuning; platform-specific behaviourStandard web apps; RDS for SQL Server instead of self-managed SQL on VMs
SaaSNothing to run; fastest time to valueLeast control; data sits in the vendor's service; exit and integration need planningCRM, HR, contact centre, collaboration

What problem the AWS service solves

The service models exist to let you buy only the layers you don't want to operate. Every layer you hand to AWS removes work (and staff time, and an audit item), but also removes control and sometimes adds constraints.

AWS offers services across the spectrum:

  • IaaS building blocks: Amazon EC2 (virtual machines), Amazon EBS (block storage volumes for EC2), Amazon VPC (your private network).
  • Container platforms: Amazon ECS, Amazon EKS, AWS Fargate, Amazon ECR (container image registry). Module 3 uses Amazon ECS Express Mode and ECS on Fargate. (AWS App Runner, a simpler container platform, closed to new customers in 2026, so this course does not use it.)
  • FaaS: AWS Lambda.
  • PaaS application platform: AWS Elastic Beanstalk, which supports .NET on Amazon Linux 2023 and on Windows Server.
  • Managed data services (PaaS for data): Amazon RDS (including SQL Server), Amazon Aurora, Amazon DynamoDB.
  • SaaS from AWS: Amazon Connect (cloud contact centre), Amazon Quick Sight (business intelligence, part of Amazon Quick). Most SaaS a bank buys comes from other vendors, often through AWS Marketplace.

Limitations: managed services have quotas (for example Lambda's 15-minute maximum per invocation and per-Region concurrency limits), not every feature of a self-managed product is available in its managed version (for example some SQL Server features on RDS), and SaaS products differ widely in how much control they give you over data location and encryption keys. Always read the service's quotas page before you commit to it.

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS equivalentWhat's different
Hyper-V / VMware VM, Azure Virtual MachinesAmazon EC2Similar IaaS; EC2 has many instance families and purchase options (Module 3)
Azure Managed DisksAmazon EBSEBS volumes live in one Availability Zone
IIS + Windows Service on a VMEC2 (lift-and-shift), or ECS on Fargate / Lambda after modernisingAWS pushes you towards Linux containers for .NET 10; Windows remains possible
Azure App ServiceAWS Elastic Beanstalk, or ECS Express Mode for containersBeanstalk creates visible EC2 instances in your account
Azure Container Apps / AKSAmazon ECS on Fargate / Amazon EKSECS is AWS's own orchestrator and is simpler for most .NET teams
Azure FunctionsAWS LambdaBoth FaaS; Lambda has a managed .NET 10 runtime and a 15-minute maximum per invocation
Azure SQL Database / SQL Managed InstanceAmazon RDS for SQL Server (also Aurora PostgreSQL with Babelfish)Licensing and feature differences; Module 6
Microsoft 365, Dynamics 365SaaS from any vendor, e.g. Amazon Connect, or Marketplace productsAWS's own SaaS portfolio is smaller; banks mix vendors

Architecture

How Harbourline's four proposals land on the spectrum:

Security-boundary view. Moving right reduces the attack surface you patch, but the trust boundaries remain: each component still needs an IAM role with least privilege, encryption for its data and logging of access. The AML server on EC2 adds OS-level duties (patching, endpoint protection, hardened images); the Lambda function shifts those to AWS but adds a new one โ€” making sure its execution role can read only the statements prefix it needs.

Step-by-step implementation

This lesson deploys nothing โ€” that comes in Module 3. Instead, you will see each model through read-only AWS calls and a small piece of C# that shows how to keep business logic portable between models.

Refresh your session

aws sso login --profile learn-sandbox

Look at what IaaS asks you to choose

Run the EC2 commands in the AWS CLI section. Notice that with IaaS you pick an operating system image and an instance type โ€” and from then on, that operating system is yours to patch.

Look at what PaaS and FaaS ask you to choose

Run the Elastic Beanstalk and Lambda commands. With Elastic Beanstalk you pick a platform (".NET on Amazon Linux 2023"); with Lambda you pick a runtime (dotnet10). The operating system disappears from the decision.

Separate the business logic from the host

Read the Complete code: one small class computes a statement summary, and two thin adapters expose it โ€” one as a Lambda function, one as an ASP.NET Core minimal API that could run on EC2, Elastic Beanstalk or Fargate. Build it locally with dotnet build. You don't need to deploy it.

Classify Harbourline's proposals

Using the trade-off table, write down which model you would recommend for each of the four proposals in "Why this matters in banking" and one reason each. Compare with the banking use case below.

AWS Console instructions

A five-minute tour, read-only:

  1. Sign in through the access portal to cea-sandbox with SandboxAdmin, Region US East (N. Virginia).
  2. EC2 โ†’ Instances โ†’ Launch instances โ€” look at the page, then Cancel. Notice what IaaS asks for: an AMI (operating system image), instance type, key pair, network and storage.
  3. Elastic Beanstalk โ†’ Create application โ€” look at the Platform dropdown (for example .NET on Amazon Linux 2023, or .NET on Windows Server), then cancel.
  4. Lambda โ†’ Create function โ€” look at the Runtime dropdown (you should find .NET 10), then cancel. There is no operating system to choose.
  5. Amazon Connect โ€” open the service page only. There is no server, platform or runtime: a SaaS product starts with an instance of the application and user settings.

Do not complete any of the create wizards in this lesson.

AWS CLI

Read-only and free. PowerShell quoting.

# IaaS: the latest Windows Server 2022 and Amazon Linux 2023 AMI IDs, from AWS public parameters.
# With IaaS you choose the operating system image - and then you own its patching.
aws ssm get-parameter --name /aws/service/ami-windows-latest/Windows_Server-2022-English-Full-Base --query "Parameter.Value" --output text --region us-east-1 --profile learn-sandbox
aws ssm get-parameter --name /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 --query "Parameter.Value" --output text --region us-east-1 --profile learn-sandbox

# IaaS: the size choices - vCPUs and memory for a few general-purpose instance types.
aws ec2 describe-instance-types --instance-types t3.micro m7i.large --query "InstanceTypes[].[InstanceType,VCpuInfo.DefaultVCpus,MemoryInfo.SizeInMiB]" --output table --region us-east-1 --profile learn-sandbox

# PaaS: the .NET platforms Elastic Beanstalk offers.
aws elasticbeanstalk list-available-solution-stacks --query "SolutionStacks[?contains(@, '.NET')]" --region us-east-1 --profile learn-sandbox

# FaaS: account-level Lambda limits, such as total concurrent executions and code storage.
aws lambda get-account-settings --region us-east-1 --profile learn-sandbox

# Containers: any ECS clusters (should be empty in a fresh sandbox).
aws ecs list-clusters --region us-east-1 --profile learn-sandbox

What each command teaches:

  • The two ssm get-parameter calls return AMI IDs that change as AWS publishes patched images โ€” evidence that in IaaS, picking the image (and replacing it when it is out of date) is your job.
  • describe-instance-types shows the capacity knobs IaaS gives you. PaaS and FaaS hide most of them.
  • list-available-solution-stacks returns platform names such as "64bit Amazon Linux 2023 โ€ฆ running .NET โ€ฆ"; the platform version is the "P" in PaaS.
  • get-account-settings shows AccountLimit.ConcurrentExecutions โ€” a reminder that "serverless" still has quotas.

Infrastructure as Code

Full deployments of each model come later (Module 3 and Module 10). The Terraform below creates nothing; it shows how IaC reads the same public AMI parameter, which is the first decision an IaaS deployment makes.

ami.tf
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }
}

provider "aws" {
  region  = "us-east-1"
  profile = "learn-sandbox"
}

# IaaS starts with an OS image. Reading it from the AWS public parameter means
# every plan picks up the latest patched image instead of a hard-coded, ageing ID.
data "aws_ssm_parameter" "al2023" {
  name = "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64"
}

output "latest_al2023_ami" {
  value     = data.aws_ssm_parameter.al2023.value
  sensitive = true # the provider marks SSM values sensitive; reveal with: terraform output -raw latest_al2023_ami
}

Complete code

The best way to stay free to change hosting models is to keep business logic in a plain class library and make each host a thin adapter. Three small projects:

Harbourline.Statements.Core/Harbourline.Statements.Core.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>
</Project>
Harbourline.Statements.Core/StatementSummary.cs
namespace Harbourline.Statements.Core;

/// <summary>One booked transaction, using the course's canonical field names.</summary>
public sealed record Transaction(string TransactionId, string AccountId, DateOnly BookingDate, decimal Amount, string Currency);

/// <summary>What the statement header shows.</summary>
public sealed record StatementSummary(string AccountId, string Currency, decimal TotalCredits, decimal TotalDebits, decimal NetMovement, int TransactionCount);

/// <summary>Pure business logic: no AWS, no HTTP, no hosting model.</summary>
public static class StatementCalculator
{
    public static StatementSummary Summarise(string accountId, string currency, IReadOnlyCollection<Transaction> transactions)
    {
        ArgumentException.ThrowIfNullOrWhiteSpace(accountId);

        var relevant = transactions
            .Where(t => t.AccountId == accountId && t.Currency == currency)
            .ToList();

        decimal credits = relevant.Where(t => t.Amount > 0).Sum(t => t.Amount);
        decimal debits = relevant.Where(t => t.Amount < 0).Sum(t => t.Amount);

        return new StatementSummary(accountId, currency, credits, debits, credits + debits, relevant.Count);
    }
}

Adapter 1 โ€” FaaS (Lambda):

Harbourline.Statements.Lambda/Harbourline.Statements.Lambda.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Amazon.Lambda.Core" Version="3.4.0" />
    <PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="3.0.1" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Harbourline.Statements.Core\Harbourline.Statements.Core.csproj" />
  </ItemGroup>
</Project>
Harbourline.Statements.Lambda/Function.cs
using Amazon.Lambda.Core;
using Harbourline.Statements.Core;

// Tells the Lambda runtime how to turn JSON events into C# objects and back.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]

namespace Harbourline.Statements.Lambda;

public sealed record SummaryRequest(string AccountId, string Currency, List<Transaction> Transactions);

public sealed class Function
{
    // Handler string for the dotnet10 runtime: Harbourline.Statements.Lambda::Harbourline.Statements.Lambda.Function::Handle
    public StatementSummary Handle(SummaryRequest request, ILambdaContext context)
    {
        context.Logger.LogInformation($"Summarising {request.Transactions.Count} transactions for {request.AccountId}");
        return StatementCalculator.Summarise(request.AccountId, request.Currency, request.Transactions);
    }
}

Adapter 2 โ€” a web host (IaaS VM, Elastic Beanstalk or a container on Fargate):

Harbourline.Statements.Api/Harbourline.Statements.Api.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include="..\Harbourline.Statements.Core\Harbourline.Statements.Core.csproj" />
  </ItemGroup>
</Project>
Harbourline.Statements.Api/Program.cs
using Harbourline.Statements.Core;

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

// Same business logic, different host. On EC2, Elastic Beanstalk or Fargate this is just a web app.
app.MapPost("/accounts/{accountId}/statement-summary",
    (string accountId, string currency, List<Transaction> transactions) =>
        Results.Ok(StatementCalculator.Summarise(accountId, currency, transactions)));

app.Run();

Build locally (no AWS needed):

dotnet build Harbourline.Statements.Lambda
dotnet run --project Harbourline.Statements.Api
# In a second terminal - a fictional account and transactions:
$body = '[{"transactionId":"0192f3a0-0000-7000-8000-000000000001","accountId":"ACC-0000012345","bookingDate":"2026-10-01","amount":2500.00,"currency":"GBP"},{"transactionId":"0192f3a0-0000-7000-8000-000000000002","accountId":"ACC-0000012345","bookingDate":"2026-10-03","amount":-84.20,"currency":"GBP"}]'
Invoke-RestMethod -Method Post -ContentType "application/json" -Body $body -Uri "http://localhost:5000/accounts/ACC-0000012345/statement-summary?currency=GBP"

The port in the last line is whatever dotnet run prints in its "Now listening on" line; adjust it if yours differs.

Code explained line by line

  1. public sealed record Transaction(...) โ€” the canonical transaction fields from the course conventions (subset). decimal Amount because money is never double; positive is a credit, negative a debit.
  2. StatementCalculator.Summarise โ€” a static pure function: same input, same output, no I/O. It is trivially unit-testable and has no idea where it runs.
  3. ArgumentException.ThrowIfNullOrWhiteSpace(accountId) โ€” fail fast on bad input (a .NET 8+ helper).
  4. .Where(t => t.AccountId == accountId && t.Currency == currency) โ€” only the account and currency being summarised; mixing currencies in one total is a classic statement bug.
  5. credits + debits โ€” debits are already negative, so adding gives the net movement.
  6. [assembly: LambdaSerializer(...)] โ€” Lambda passes events as JSON. This attribute tells the runtime to use System.Text.Json to deserialise the request into SummaryRequest and serialise the return value.
  7. public StatementSummary Handle(SummaryRequest request, ILambdaContext context) โ€” a Lambda handler is just a method. ILambdaContext gives you the logger, remaining execution time and request ID.
  8. context.Logger.LogInformation(...) โ€” writes to CloudWatch Logs when deployed. Note it logs a count and an account ID, never the transaction details.
  9. GenerateRuntimeConfigurationFiles โ€” makes the build emit the runtimeconfig.json the managed Lambda runtime needs.
  10. app.MapPost("/accounts/{accountId}/statement-summary", ...) โ€” a minimal API endpoint. ASP.NET Core binds accountId from the route, currency from the query string and the transaction list from the JSON body.
  11. Results.Ok(...) โ€” returns HTTP 200 with the summary as JSON. A production API would add validation, authentication and ProblemDetails errors (Module 4).

The design point: the adapters contain no business rules. If Harbourline later moves the statement summary from Lambda to Fargate (because invocations got longer than 15 minutes, say), only the thin adapter changes.

Security considerations

  • Responsibility moves, accountability does not. Whichever model you choose, the bank owns access to customer data, encryption decisions and logging. Write the responsibility split down per workload โ€” banking supervisors expect firms to understand it (the Shared Responsibility Model lesson goes deeper).
  • IaaS adds OS duties: patching cadence, hardened images, endpoint protection, no inbound SSH/RDP from the internet (use AWS Systems Manager Session Manager, Module 5).
  • Containers add image duties: minimal base images, vulnerability scanning in Amazon ECR, rebuilding when base images are patched.
  • FaaS adds permission and event duties: one narrowly scoped execution role per function, validation of every event (an S3 event is still untrusted input), no secrets in environment variables in plain text (use Secrets Manager or Parameter Store).
  • SaaS adds supplier duties: due diligence on the vendor's controls and data location, contract terms (audit rights, exit), and integration with the bank's identity provider.

โš  Learning shortcut โ€” not for production

The minimal API above has no authentication, no input validation beyond model binding and listens on plain HTTP on localhost. That is fine for a local demonstration. A production Accounts API sits behind API Gateway or a load balancer with TLS, authenticates every caller (OAuth 2.0 / mTLS for partners), validates input, returns RFC 9457 ProblemDetails and logs with correlation IDs โ€” Module 4 builds exactly that.

โš  Learning shortcut โ€” not for production

The Lambda adapter receives the transactions inside the event. Real statement processing would read them from an encrypted data store with the function's own least-privilege role, because Lambda event payloads have size limits and request payloads can end up in logs or dead-letter queues if you are careless.

Banking use case

Harbourline's review board decides:

ProposalModel chosenReasonNew duty the bank accepts
AML case management (vendor, Windows-only)IaaS โ€” EC2 Windows Server, database on RDS for SQL ServerVendor supports only a full Windows install; RDS removes database patchingOS patching and hardening; vendor upgrade testing
Accounts API (ASP.NET Core)Containers โ€” ECS on FargateLong-running HTTP service, same image locally and in AWS, no hosts to patchBase-image patching and image scanning
Statement rendererFaaS โ€” Lambda on dotnet10, triggered by S3 eventsSpiky, event-driven, each job takes seconds; scales to zeroExecution-role least privilege; event validation
Contact centreSaaS โ€” Amazon Connect (or another vendor)Telephony is not a differentiator; buy itSupplier assurance, call-recording retention and encryption settings, identity integration

The board also records that the contact-centre decision is an outsourcing arrangement to be assessed by the third-party risk team, and that call recordings contain personal data, so the data-protection officer must approve retention settings. None of these choices is compliant or non-compliant by itself.

Common mistakes

  • Treating the models as rigid boxes โ†’ certification diagrams show three neat columns โ†’ real AWS services sit on a spectrum (Beanstalk creates EC2 instances you can change). Ask "which layers do I operate?" instead of "which box is it?"
  • Lifting a small function onto a VM โ†’ it is the familiar IIS habit โ†’ you inherit OS patching and idle cost for 200 lines of code. Consider Lambda or a container.
  • Forcing long-running work into Lambda โ†’ "serverless is modern" โ†’ a job that runs longer than 15 minutes per invocation will be cut off. Use Fargate or Step Functions to split the work.
  • Assuming SaaS means no responsibility โ†’ the vendor runs it โ†’ you still configure users, MFA, retention and data sharing, and you carry the outsourcing obligations.
  • Coupling business logic to the host โ†’ handler methods full of rules โ†’ moving hosts means rewriting. Keep rules in a plain library.
  • Forgetting container images need patching โ†’ "Fargate is serverless" โ†’ AWS patches the host, but your image's base OS packages are yours.

Troubleshooting

SymptomLikely causeFix
aws ssm get-parameter returns ParameterNotFoundTypo in the public parameter path, or the image name changedList available names: aws ssm get-parameters-by-path --path /aws/service/ami-windows-latest --query "Parameters[].Name" --region us-east-1
list-available-solution-stacks returns an empty list for .NETQuery filter case or quoting in PowerShellKeep the outer double quotes and inner single quotes exactly as shown
dotnet build of the Lambda project: NU1101 Unable to find package Amazon.Lambda.CoreNo access to nuget.org (proxy)Configure your NuGet source or proxy; check dotnet nuget list source
Minimal API returns HTTP 415Request sent without a JSON content typePass -ContentType "application/json"
Minimal API returns HTTP 400 mentioning currencyMissing ?currency=GBP query parameterAdd it to the URL
AccessDenied ... explicit deny in a service control policyCommand sent to a Region the sandbox guardrail blocksUse --region us-east-1

Cost and cleanup

Cost: $0. All AWS commands are read-only describe/list/get calls, Terraform data sources create nothing, and the code runs on your PC. The console tour does not complete any wizard.

Cleanup:

# Remove local build output and Terraform working files (run in the folders you used).
Remove-Item -Recurse -Force .\Harbourline.Statements.*\bin, .\Harbourline.Statements.*\obj -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force .terraform, .terraform.lock.hcl -ErrorAction SilentlyContinue

# Confirm nothing tagged for the course exists in the sandbox.
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab --query "ResourceTagMappingList[].ResourceARN" --region us-east-1 --profile learn-sandbox

Exercises

  • ๐ŸŸข Guided: Run every CLI command in this lesson. For each, write one line: "This shows that in model X, I choose Y and therefore own Z."
  • ๐ŸŸก Challenge: Add a unit-test project (xUnit v3) for StatementCalculator with tests for mixed currencies, an empty list and an account with only debits. Then explain in two sentences why these tests do not change when the host changes.
  • ๐Ÿ”ด Live problem: A product owner says: "Our new loan-eligibility check takes about 20 minutes per batch of applications and runs a few times a day. The team wants Lambda because it's cheapest. Security wants EC2 because they know how to audit servers." Recommend a model and explain the trade-off to both sides.

Assignment

Write docs/m01-service-models.md in your learning-journal repository: a table of five systems you have worked on (anonymised โ€” no employer names or real data), the model you would choose for each on AWS, the AWS service, the Azure service you used or would have used, and the one new duty the bank would accept. Add the Harbourline.Statements.Core project and its tests.

Solutions

Knowledge check

Interview questions

  • "When would you choose EC2 over Lambda for a .NET workload?" โ€” When I need OS-level control (vendor software, Windows-only components, agents), long-running processes, or steady high utilisation where an always-on instance is cheaper per unit of work. Otherwise I'd start with containers or Lambda to avoid patching and idle cost.
  • "What does 'serverless' really mean?" โ€” No servers for me to provision or patch, automatic scaling and paying for use. It includes Lambda but also Fargate, S3, DynamoDB, SQS and API Gateway. It does not mean no limits: there are quotas, timeouts and cold starts.
  • "How do the service models change compliance evidence?" โ€” The more layers the provider runs, the more I rely on its attestations (SOC reports, ISO certificates via AWS Artifact) and the less I evidence myself; but data access, encryption, configuration and logging evidence always stays with the bank.
  • "How would you keep a .NET application portable between hosting models?" โ€” Clean separation: business logic in a plain library with tests, thin host adapters (Lambda handler, minimal API, worker service), configuration and secrets injected rather than read from host-specific places.

Certification practice

Completion checklist

  • I can draw the responsibility stack for IaaS, containers, FaaS, PaaS and SaaS from memory
  • I can name an AWS and an Azure service for each model
  • I ran the read-only CLI commands and built the code locally
  • I can explain the 15-minute Lambda limit and what to use instead for longer jobs
  • I confirmed nothing tagged Project=cea-lab exists and cleaned up local build output

Key takeaways

  • The service models are about which layers you operate: IaaS (from the OS up), PaaS (your code and config), SaaS (configuration and data only).
  • Containers and serverless sit between IaaS and SaaS; "serverless" means no servers for you to manage, not no limits.
  • The data, its access and its protection stay with the bank in every model.
  • Choose the model by the workload's constraints (OS needs, run time, traffic shape) and the duties you're willing to own.
  • Keep business logic in a plain library so changing hosting model is a small adapter change.

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