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.
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
- What cloud computing really is
- Tools: AWS CLI v2 with the
learn-sandboxprofile; .NET 10 SDK for the optional code
Why this matters in banking
Harbourline Bank's architecture review board meets every Tuesday. In one month it sees four proposals:
- A vendor's anti-money-laundering (AML) case-management product that only installs on Windows Server.
- A new customer-facing Accounts API written in ASP.NET Core.
- A function that renders a PDF statement whenever a statement file lands in storage.
- 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
| Layer | On premises | IaaS (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 it | You | You | You | You | You | You |
| Application code | You | You | You | You | You | Provider |
| Application configuration | You | You | You | You | You | You (settings, users) |
| Runtime (.NET) | You | You | You (inside your image) | Provider (managed runtime) | Provider (platform version, you choose when to update) | Provider |
| Operating system | You | You | You for the image contents; provider for the host | Provider | Provider manages the platform; instances are in your account | Provider |
| Virtualisation, servers, storage, network hardware | You | Provider | Provider | Provider | Provider | Provider |
| Data centre, power, physical security | You | Provider | Provider | Provider | Provider | Provider |
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
| Model | Strengths | Weaknesses | Typical banking fit |
|---|---|---|---|
| IaaS | Full control of OS and software; runs almost anything, including vendor products and Windows-only software; easiest lift-and-shift | You patch, harden, back up and scale; more audit evidence to produce; easy to over-provision | Vendor packages, legacy Windows services, software with OS-level licensing or agents |
| Containers on Fargate / ECS | Same image runs locally and in AWS; no hosts to patch; good for long-running APIs | You own the image (base image patching, vulnerability scanning); some platform limits | ASP.NET Core APIs, background workers |
| FaaS (Lambda) | No servers, scales to zero, pay per request, event-driven integration | Maximum execution time per invocation (15 minutes), cold starts, packaging limits, different local debugging | Event handlers, file processing, glue code, low-traffic APIs |
| PaaS app platform / managed databases | Platform patching and scaling handled; fast to adopt | Less control over versions and tuning; platform-specific behaviour | Standard web apps; RDS for SQL Server instead of self-managed SQL on VMs |
| SaaS | Nothing to run; fastest time to value | Least control; data sits in the vendor's service; exit and integration need planning | CRM, 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 equivalent | What's different |
|---|---|---|
| Hyper-V / VMware VM, Azure Virtual Machines | Amazon EC2 | Similar IaaS; EC2 has many instance families and purchase options (Module 3) |
| Azure Managed Disks | Amazon EBS | EBS volumes live in one Availability Zone |
| IIS + Windows Service on a VM | EC2 (lift-and-shift), or ECS on Fargate / Lambda after modernising | AWS pushes you towards Linux containers for .NET 10; Windows remains possible |
| Azure App Service | AWS Elastic Beanstalk, or ECS Express Mode for containers | Beanstalk creates visible EC2 instances in your account |
| Azure Container Apps / AKS | Amazon ECS on Fargate / Amazon EKS | ECS is AWS's own orchestrator and is simpler for most .NET teams |
| Azure Functions | AWS Lambda | Both FaaS; Lambda has a managed .NET 10 runtime and a 15-minute maximum per invocation |
| Azure SQL Database / SQL Managed Instance | Amazon RDS for SQL Server (also Aurora PostgreSQL with Babelfish) | Licensing and feature differences; Module 6 |
| Microsoft 365, Dynamics 365 | SaaS from any vendor, e.g. Amazon Connect, or Marketplace products | AWS'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-sandboxLook 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:
- Sign in through the access portal to
cea-sandboxwith SandboxAdmin, Region US East (N. Virginia). - 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.
- Elastic Beanstalk โ Create application โ look at the Platform dropdown (for example .NET on Amazon Linux 2023, or .NET on Windows Server), then cancel.
- Lambda โ Create function โ look at the Runtime dropdown (you should find .NET 10), then cancel. There is no operating system to choose.
- 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-sandboxWhat each command teaches:
- The two
ssm get-parametercalls 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-typesshows the capacity knobs IaaS gives you. PaaS and FaaS hide most of them.list-available-solution-stacksreturns platform names such as "64bit Amazon Linux 2023 โฆ running .NET โฆ"; the platform version is the "P" in PaaS.get-account-settingsshowsAccountLimit.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.
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:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>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):
<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>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):
<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>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
public sealed record Transaction(...)โ the canonical transaction fields from the course conventions (subset).decimal Amountbecause money is neverdouble; positive is a credit, negative a debit.StatementCalculator.Summariseโ astaticpure function: same input, same output, no I/O. It is trivially unit-testable and has no idea where it runs.ArgumentException.ThrowIfNullOrWhiteSpace(accountId)โ fail fast on bad input (a .NET 8+ helper)..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.credits + debitsโ debits are already negative, so adding gives the net movement.[assembly: LambdaSerializer(...)]โ Lambda passes events as JSON. This attribute tells the runtime to useSystem.Text.Jsonto deserialise the request intoSummaryRequestand serialise the return value.public StatementSummary Handle(SummaryRequest request, ILambdaContext context)โ a Lambda handler is just a method.ILambdaContextgives you the logger, remaining execution time and request ID.context.Logger.LogInformation(...)โ writes to CloudWatch Logs when deployed. Note it logs a count and an account ID, never the transaction details.GenerateRuntimeConfigurationFilesโ makes the build emit theruntimeconfig.jsonthe managed Lambda runtime needs.app.MapPost("/accounts/{accountId}/statement-summary", ...)โ a minimal API endpoint. ASP.NET Core bindsaccountIdfrom the route,currencyfrom the query string and the transaction list from the JSON body.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:
| Proposal | Model chosen | Reason | New duty the bank accepts |
|---|---|---|---|
| AML case management (vendor, Windows-only) | IaaS โ EC2 Windows Server, database on RDS for SQL Server | Vendor supports only a full Windows install; RDS removes database patching | OS patching and hardening; vendor upgrade testing |
| Accounts API (ASP.NET Core) | Containers โ ECS on Fargate | Long-running HTTP service, same image locally and in AWS, no hosts to patch | Base-image patching and image scanning |
| Statement renderer | FaaS โ Lambda on dotnet10, triggered by S3 events | Spiky, event-driven, each job takes seconds; scales to zero | Execution-role least privilege; event validation |
| Contact centre | SaaS โ Amazon Connect (or another vendor) | Telephony is not a differentiator; buy it | Supplier 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
| Symptom | Likely cause | Fix |
|---|---|---|
aws ssm get-parameter returns ParameterNotFound | Typo in the public parameter path, or the image name changed | List 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 .NET | Query filter case or quoting in PowerShell | Keep the outer double quotes and inner single quotes exactly as shown |
dotnet build of the Lambda project: NU1101 Unable to find package Amazon.Lambda.Core | No access to nuget.org (proxy) | Configure your NuGet source or proxy; check dotnet nuget list source |
| Minimal API returns HTTP 415 | Request sent without a JSON content type | Pass -ContentType "application/json" |
Minimal API returns HTTP 400 mentioning currency | Missing ?currency=GBP query parameter | Add it to the URL |
AccessDenied ... explicit deny in a service control policy | Command sent to a Region the sandbox guardrail blocks | Use --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-sandboxExercises
- ๐ข 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
StatementCalculatorwith 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
Example answers: "The AMI parameter shows that in IaaS I choose the operating system image and therefore own its patching." "describe-instance-types shows that in IaaS I choose CPU and memory and therefore own sizing and cost." "The Beanstalk stacks show that in PaaS I choose a platform version and therefore own when to update it, but not the patches themselves." "get-account-settings shows that in FaaS I choose a runtime and memory, and therefore own concurrency planning within the account limit." Why: the exercise trains you to see each model as a list of decisions and duties, which is exactly how a risk team will question your design.
using Harbourline.Statements.Core;
public class StatementCalculatorTests
{
private const string Account = "ACC-0000012345";
[Fact]
public void Ignores_other_currencies()
{
var txns = new List<Transaction>
{
new("t1", Account, new DateOnly(2026, 10, 1), 100.00m, "GBP"),
new("t2", Account, new DateOnly(2026, 10, 2), 50.00m, "EUR"),
};
var summary = StatementCalculator.Summarise(Account, "GBP", txns);
Assert.Equal(100.00m, summary.TotalCredits);
Assert.Equal(1, summary.TransactionCount);
}
[Fact]
public void Empty_list_gives_zero_totals()
{
var summary = StatementCalculator.Summarise(Account, "GBP", []);
Assert.Equal(0m, summary.NetMovement);
Assert.Equal(0, summary.TransactionCount);
}
[Fact]
public void Debits_only_gives_negative_net()
{
var txns = new List<Transaction>
{
new("t1", Account, new DateOnly(2026, 10, 1), -20.00m, "GBP"),
new("t2", Account, new DateOnly(2026, 10, 2), -5.50m, "GBP"),
};
var summary = StatementCalculator.Summarise(Account, "GBP", txns);
Assert.Equal(0m, summary.TotalCredits);
Assert.Equal(-25.50m, summary.TotalDebits);
Assert.Equal(-25.50m, summary.NetMovement);
}
}The test project references only Harbourline.Statements.Core and xunit.v3 4.0.3 (with OutputType Exe and the Microsoft.Testing.Platform runner, as in the course conventions). Why the tests don't change: they exercise the pure library, which knows nothing about Lambda or ASP.NET Core; only the adapters would change if the host changed.
A 20-minute batch exceeds Lambda's 15-minute maximum per invocation, so plain "one Lambda per batch" is not viable. Two good options: (1) ECS task on Fargate started on a schedule โ no servers to patch (which addresses security's audit concern better than EC2, because there is no OS for the bank to harden), billed per second while it runs; or (2) split each batch into per-application items processed by Lambda in parallel, orchestrated by Step Functions โ more redesign but scales well. Explain to security that Fargate's evidence comes from AWS's attestations for the host plus the bank's image scanning and IAM controls, and offer to walk them through it. Explain to the product owner that EC2 would cost more for a job that runs a few times a day and would add patching work. Why: good recommendations name the hard constraint (15 minutes), compare realistic alternatives and translate the trade-off for each stakeholder.
Knowledge check
Answer: The customer. In IaaS the provider manages the physical infrastructure and virtualisation; the operating system and everything above it are yours.
Answer: Because you never provision, size, patch or even see the underlying hosts; AWS manages them, scaling is handled for you and you pay for the vCPU and memory your tasks use. You still own the container image's contents.
Answer: The data and who can access it (plus the configuration of the service you use, such as user accounts and retention settings).
Answer: Lambda, because a single invocation can run for at most 15 minutes. EC2 and Fargate can run long jobs.
Answer: Azure App Service is the closest equivalent. A visible difference is that Elastic Beanstalk creates ordinary EC2 instances, load balancers and Auto Scaling groups in your own account, which you can inspect and modify.
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
A company wants to run its application without managing operating systems or runtimes, but it still wants to deploy its own code. Which cloud computing model best fits?
A. Infrastructure as a Service (IaaS) B. Platform as a Service (PaaS) C. Software as a Service (SaaS) D. On-premises virtualisation
Answer: B. PaaS manages the OS and runtime while the customer deploys code. A leaves the OS to the customer. C provides a finished application, so the customer would not deploy its own code. D keeps every layer on the customer.
A developer needs to run a small piece of code each time a file is uploaded to Amazon S3. The code finishes in under 10 seconds. The company wants to avoid managing servers and pay only when the code runs. Which AWS service should the developer use?
A. Amazon EC2 B. AWS Lambda C. Amazon EBS D. AWS Elastic Beanstalk
Answer: B. Lambda runs code in response to events such as S3 uploads and bills per request and duration. A requires managing instances that run continuously. C is block storage, not compute. D is an application platform that runs EC2 instances continuously, so you pay while it is idle.
Which task is the customer's responsibility when using Amazon EC2 but AWS's responsibility when using AWS Lambda?
A. Configuring IAM permissions for the workload B. Patching the operating system that runs the code C. Classifying and protecting the data the code processes D. Writing secure application code
Answer: B. On EC2 the customer patches the guest OS; with Lambda, AWS manages the OS and runtime patches. A, C and D remain customer responsibilities in both cases.
A bank's reporting job runs once per hour, processes files for 25โ35 minutes, and must not require the operations team to patch servers. Which solution meets these requirements with the least operational overhead?
A. A Lambda function invoked by an EventBridge schedule B. An Amazon ECS task on AWS Fargate started by an EventBridge schedule C. An EC2 instance with a Windows scheduled task D. An Elastic Beanstalk worker environment running continuously
Answer: B. Fargate runs the containerised job for as long as needed, with no hosts to patch, and bills only while the task runs. A fails because the job can exceed Lambda's 15-minute limit. C requires OS patching. D keeps EC2 instances running (and patched on your schedule) between runs.
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-labexists 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
- Types of cloud computing โ Overview of Amazon Web Services whitepaper
- What is cloud computing? (AWS)
- AWS Shared Responsibility Model
- NIST SP 800-145: The NIST Definition of Cloud Computing
- Public parameters for AWS global infrastructure
- Course pages: Microsoft-to-AWS mapping ยท Module 3: .NET on AWS
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.
What cloud computing really is
Explain cloud computing in plain language, map it to your on-premises IIS and SQL Server experience, and reason about capacity, cost and agility like a cloud engineer.
Public, private and hybrid cloud
Explain the cloud deployment models, why banks run hybrid for years, and which AWS building blocks connect an on-premises data centre to AWS for networking, identity, compute and data residency.