Skip to Content
Cloud Engineering Academy
3. .NET Application Development on AWS

Module project: one API, three hosts

Deploy the Harbourline Accounts API to Elastic Beanstalk, to ECS on Fargate behind an ALB, and to Lambda behind an HTTP API, measure each with the same probe, price each one, and record your recommendation as an architecture decision record.

advanced⏱ 4 h 🟡 Low costDVA-C03SAA-C03

Assumes: .NET 10 LTS · Amazon.CDK.Lib 2.277.0 · Cdklabs.CdkNag 3.0.2 · Elastic Beanstalk .NET 10 on Amazon Linux 2023 · ECS Fargate (arm64) · Lambda dotnet10 (arm64) · AWS CLI v2 · Region us-east-1 · labs/m03-accounts-api. Verified against official sources on 2026-11-18.

What you are building

A decision, backed by evidence. You take one ASP.NET Core API, the Harbourline Accounts API with its tests, and run the same build on three AWS hosts:

  1. AWS Elastic Beanstalk: a single-instance environment, .NET 10 on Amazon Linux 2023.
  2. Amazon ECS on AWS Fargate: tasks in private subnets behind an Application Load Balancer.
  3. AWS Lambda (dotnet10): behind an API Gateway HTTP API.

All three read the same DynamoDB table with the same least-privilege permissions and the same Parameter Store path, so any difference you measure comes from the host, not from the application. You then measure latency and cold starts with one probe, price each host with a stated model, and write a one-page comparison and an architecture decision record (ADR) that a colleague could challenge. No data is real; no deployment is left running.

Learning objectives

By the end of the project you can:

  • Deploy one application to three different compute models and explain what each one made you configure (a platform zip, a container image, a function package).
  • Show that the three hosts share an identity model: a role per host, with the same read-only grant, and no keys.
  • Measure first-request and warm latency fairly: same client, same network, same path, with known caveats (TLS on first connection, cold starts).
  • Build a cost model with stated assumptions, find the break-even request volume between a fixed-cost host and a per-request host, and say how fragile that number is.
  • Write an ADR that states context, options, decision, consequences and a review trigger.
  • Tear down all five stacks and prove nothing is billing.

Prerequisites

Cost label

PartLabelNotes
Tests, local run, cdk synth, cost model, ADR🟢 freeEverything except the three deployments
Lambda + HTTP API🟢 freeWithin the Lambda free allowance for lab traffic
Beanstalk single instance🟡 creditsAbout one cent per hour for a t3.micro plus its public IPv4 address ⚠ VERIFY
Fargate + ALB + NAT gateway🟡 creditsThe expensive part: roughly USD 0.10 per hour while running
Total🟡 creditsAbout USD 0.10 to 0.30 if everything is up for one to three hours and destroyed the same day

Free alternative: do Parts 1, 5, 6 and 7 without deploying. Run the probe against http://localhost:5080 for the baseline, run cdk synth for all three stacks to read the generated CloudFormation and the cdk-nag results, and complete the cost model and ADR using published prices and the formulas below instead of measured latency. You lose the real cold-start data, so say so in the ADR.

Architecture

BeanstalkFargateLambda
Unit you deployZip of dotnet publish outputContainer image in ECR (arm64)Zip of dotnet publish -r linux-arm64
Front doornginx on the instance (public IP)ALB in public subnets, HTTP 80HTTP API, HTTPS
Where the code runsEC2 t3.micro, Amazon Linux 2023Tasks, 0.25 vCPU / 0.5 GB, private subnetsExecution environment, 1024 MB, arm64
App identityInstance profile roleTask roleExecution role
Port or eventPORT=50008080API Gateway payload 2.0
HealthBeanstalk enhanced health on /health/readyALB target group on /health/readyNone (invocation errors)
ScalingNone (single instance)Target tracking, 1 to 3 tasksAutomatic, per request
LogsBeanstalk log streaming, 7 days/hl-m03/accounts-api/ecs, 7 days/hl-m03/accounts-api/lambda, 7 days
StackHlM03-BeanstalkHlM03-Registry, HlM03-FargateHlM03-Lambda

Security boundary view. Each host has its own identity (instance profile, task role, execution role) and each role gets the same two statements from one helper, AccountsApiPermissions.GrantReadOnly: read one table and its indexes, read one Parameter Store path. None of them can write the table, reach other tables, read other parameters or call other services. Authentication on the API is disabled with an explicit override in all three stacks (see the shortcut below). The unprotected parts of each host are different: Beanstalk exposes the instance on port 80 in the default VPC, the ALB listens on HTTP 80 in public subnets, the HTTP API has a public HTTPS endpoint with a throttle.

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS host in this projectWhat's different
App Service (Windows or Linux plan)Elastic BeanstalkBeanstalk creates real EC2, security group and (in other modes) ALB and Auto Scaling resources in your account
Container Apps, or App Service for ContainersECS on Fargate + ALBYou describe the network (VPC, subnets, security groups) yourself
Functions with ASP.NET Core integration, Consumption planLambda + HTTP APICold starts are visible in REPORT lines; the platform bills per request and duration
Azure Pricing Calculator comparison of plansA model you write yourselfThe point of Part 6: make the assumptions visible
Architecture Decision Records in a wikiADR in the repositorySame idea; keep it next to the code and review it in a pull request

Part 1: prepare (free)

All commands run from labs/m03-accounts-api in Git Bash.

Run the tests

dotnet test --solution AccountsApi.slnx

Expected: 71 passed, 1 skipped (the optional real-AWS smoke test). Do not deploy anything that fails its tests: a deployment proves the host works, not that the code does.

Run it locally and take the baseline

dotnet run --project src/Harbourline.Accounts.Api --launch-profile http
# in a second window:
dotnet run tools/latency-probe.cs -- http://localhost:5080 200

This is the zero-network baseline (in-memory repository, no TLS). Write down p50, p95 and p99. Everything you measure later minus this is what the host, the network and DynamoDB add.

Deploy the shared table, seed it, create the key parameter

export AWS_PROFILE=learn-sandbox AWS_REGION=us-east-1
OWNER=<your-name>
cd infra/cdk && cdk deploy HlM03-Shared -c owner=$OWNER && cd ../..
for f in seed/batch-*.json; do aws dynamodb batch-write-item --request-items "file://$f"; done
aws ssm put-parameter --name /hl-m03/accounts-api/Pseudonymisation/Key --type SecureString \
  --value "$(openssl rand -hex 32)" \
  --tags Key=Project,Value=cea-lab Key=Lab,Value=m03-accounts-api Key=Environment,Value=learn Key=Owner,Value=$OWNER

Each batch-write-item must report "UnprocessedItems": {}; if not, run that file again.

Read the stacks before you deploy them

cd infra/cdk
cdk synth HlM03-Fargate -c owner=$OWNER > /dev/null     # cdk-nag runs here; a finding fails the synth
cd ../..

Skim BeanstalkStack.cs, FargateStack.cs and LambdaStack.cs. Notice what is shared (AccountsApiPermissions, the table name, the parameter path, the tags) and what is host-specific. Count the resources each stack creates, then write your prediction: which host will have the lowest warm p50, the highest first-request latency and the lowest hourly cost? You will compare it with the evidence.

Part 2: Host 1, Elastic Beanstalk

Publish and zip the contents

dotnet publish src/Harbourline.Accounts.Api -c Release -o publish/beanstalk
# Zip the CONTENTS (files at the archive root) with Windows' built-in bsdtar: it writes forward slashes.
(cd publish/beanstalk && /c/Windows/System32/tar.exe -a -c -f ../beanstalk.zip *)

Beanstalk starts the app from <name>.runtimeconfig.json, so the output stays framework-dependent. A zip with a top-level folder, or with backslashes in entry names (PowerShell 5.1's Compress-Archive), leads to a 502 from nginx.

Find the exact platform name and deploy

aws elasticbeanstalk list-available-solution-stacks \
  --query "SolutionStacks[?contains(@, 'Amazon Linux 2023') && contains(@, '.NET 10')]"

cd infra/cdk
cdk deploy HlM03-Beanstalk -c owner=$OWNER -c ebSolutionStack="<exact name from the query>"
cd ../..

The platform name changes with every platform release, so look it up each time. Creation takes about 5 to 10 minutes. The ApiUrl output is the environment URL (HTTP).

Check it

EB=$(aws cloudformation describe-stacks --stack-name HlM03-Beanstalk \
  --query "Stacks[0].Outputs[?OutputKey=='ApiUrl'].OutputValue" --output text)
curl -i $EB/health/ready
curl -s $EB/v1/accounts/ACC-0000000001

Note what you had to do yourself on this host: choose a platform branch, zip the output, and set PORT (the stack does it). Note what Beanstalk did for you: instance profile wiring, health reporting, log streaming, managed platform updates.

Part 3: Host 2, ECS on Fargate

Create the registry and push an arm64 image

cd infra/cdk && cdk deploy HlM03-Registry -c owner=$OWNER && cd ../..
ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
REGISTRY=$ACCOUNT.dkr.ecr.us-east-1.amazonaws.com
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
docker buildx build --platform linux/arm64 -t $REGISTRY/hl-m03-accounts-api:v1 --push .
aws ecr wait image-scan-complete --repository-name hl-m03-accounts-api --image-id imageTag=v1
aws ecr describe-image-scan-findings --repository-name hl-m03-accounts-api --image-id imageTag=v1 \
  --query "imageScanFindings.findingSeverityCounts"

Tags are immutable: a changed image needs a new tag (v2). The details and the rationale are in Lab 3.3.

Deploy

cd infra/cdk && cdk deploy HlM03-Fargate -c owner=$OWNER -c imageTag=v1 && cd ../..
FG=$(aws cloudformation describe-stacks --stack-name HlM03-Fargate \
  --query "Stacks[0].Outputs[?OutputKey=='ApiUrl'].OutputValue" --output text)
curl -i $FG/health/ready

This takes about 5 to 8 minutes. From now on the meter is running at roughly USD 0.10 per hour: do not leave this stack up while you write.

Part 4: Host 3, Lambda + HTTP API

Publish for arm64 and deploy

dotnet publish src/Harbourline.Accounts.Api -c Release -r linux-arm64 --self-contained false -o publish/lambda
cd infra/cdk && cdk deploy HlM03-Lambda -c owner=$OWNER && cd ../..
LM=$(aws cloudformation describe-stacks --stack-name HlM03-Lambda \
  --query "Stacks[0].Outputs[?OutputKey=='ApiUrl'].OutputValue" --output text)
curl -i $LM/health/ready

Replay the sample event too (aws lambda invoke --function-name hl-m03-accounts-api --payload fileb://events/get-account-v2.json out.json). The step-by-step explanation, the cold-start experiments and the Terraform variant are in Lab 3.4.

Part 5: measure

Method matters more than the numbers. Follow it exactly so your table is defensible.

Fix the conditions

  • Same machine, same network, same time window. Close other heavy network use. Do all runs in one sitting.
  • Same request. The default path /v1/accounts/ACC-0000000001 goes through routing, validation, a DynamoDB GetItem and JSON serialisation.
  • Sequential requests. The probe sends one at a time on purpose: it measures per-request latency, not throughput, and it cannot overload or bill your deployment.
  • Know your caveats. Beanstalk and the ALB are HTTP; the HTTP API is HTTPS. The first request to the HTTPS host pays a TLS handshake that the HTTP hosts do not. The probe reuses one connection afterwards, so the warm numbers are comparable; the first-request numbers are not strictly like with like, and you must say so. Tasks reach DynamoDB through a gateway endpoint; the other two use the public endpoint.

Run the probe three times per host

for H in "$EB" "$FG" "$LM"; do
  echo "=== $H ==="
  dotnet run tools/latency-probe.cs -- $H 200
done

Round 1 is straight after deployment (a cold Lambda, a warmed-up server). Do rounds 2 and 3 five minutes apart. For Lambda, also do one run after at least 15 minutes without traffic and read the Init Duration from the log:

aws logs tail /hl-m03/accounts-api/lambda --since 30m | grep REPORT

Record real numbers

Copy this table into your report and fill it with what you measured.

MeasureLocal baselineBeanstalkFargate + ALBLambda + HTTP API
First request, right after idle (ms)
Warm p50 (ms)
Warm p95 (ms)
Warm p99 (ms)
Lambda Init Duration (ms)n/an/an/a
Time from cdk deploy start to first healthy response (min)n/a
Failed requests of 200

Add one line below the table saying where you ran the probe and from which network, and one line on anything unusual (a slow first round, a 5xx, a throttle).

Part 6: price it

Measure latency, calculate cost. Prices change: check them on the pricing pages the day you do this, and write the date next to your figures.

The model

Assumptions to state in your report (change them if you disagree): one Region, 730 hours per month, requests average 60 ms of function time, 1024 MB Lambda memory on arm64, Fargate shape as deployed (one 0.25 vCPU / 0.5 GB arm64 task, one ALB, one NAT gateway, three public IPv4 addresses), Beanstalk as deployed (one t3.micro, one public IPv4 address). The data transfer and log charges are small at lab scale and are left out; say that.

ComponentUnit price usedSource / status
Fargate vCPU (Linux arm64)USD 0.03238 per vCPU-hourAWS Fargate pricing page, checked 2026-11-18
Fargate memory (Linux arm64)USD 0.00356 per GB-hoursame page
Lambda requestsUSD 0.20 per millionLambda pricing page, checked 2026-11-18
Lambda duration, x86USD 0.0000166667 per GB-secondsame page; arm64 is cheaper, see next line
Lambda duration, arm64about USD 0.0000133334 per GB-second⚠ VERIFY on the Arm tab of the pricing page
HTTP APIUSD 1.00 per million requests (first tier)API Gateway pricing page, checked 2026-11-18
Application Load Balancerabout USD 0.0225 per hour plus capacity units⚠ VERIFY
NAT gatewayabout USD 0.045 per hour plus data⚠ VERIFY
Public IPv4 addressabout USD 0.005 per hour each⚠ VERIFY
EC2 t3.micro Linuxabout USD 0.0104 per hour⚠ VERIFY

Worked example (illustrative, with the assumptions above)

HostFixed per monthVariableResult
Fargate (lab shape)Task: 0.25 × 0.03238 × 730 = 5.91, plus 0.5 × 0.00356 × 730 = 1.30; ALB 0.0225 × 730 = 16.43; NAT 0.045 × 730 = 32.85; 3 IPv4 × 0.005 × 730 = 10.95Capacity units and data: small at this scaleabout USD 67 per month
Beanstalk (lab shape)Instance 0.0104 × 730 = 7.59; IPv4 0.005 × 730 = 3.65; small disknoneabout USD 12 per month
Lambda + HTTP APInonePer million requests: 0.20 + 1.00 + compute (0.06 s × 1 GB × 0.0000133334 × 1,000,000 = 0.80)about USD 2.00 per million requests

Break-even between Fargate and Lambda for this shape: 67 divided by 2.00 is about 34 million requests per month (about 13 requests per second averaged over the month). Below it Lambda is cheaper; above it the always-on host is cheaper if one task can carry that traffic, which only your own load measurement can tell you.

Read the model critically

Most of the Fargate figure is the NAT gateway and load balancer, not compute. With VPC endpoints instead of a NAT gateway, or ECS Express Mode, the number changes a lot. And one Fargate task is not highly available: two tasks in two Availability Zones are the minimum for a bank, which adds about USD 7 per month for the second task but keeps the load balancer and NAT constant. Beanstalk single-instance has no redundancy at all. Lambda is multi-AZ by default. Put these differences in your report; a cost table without an availability row is misleading.

Part 7: the comparison and the ADR

The one-page comparison

Write one page (a table plus five or six sentences) covering these rows for the three hosts: warm latency, cold start or start-up behaviour, deployment effort (steps you ran, time to first healthy response), operational burden (what you patch, scale, monitor), availability, security surface (what is public, what identity it uses), cost model and monthly figure, and rollback. Use only evidence from this project.

The ADR

An ADR is a short record of one decision, written for the person who inherits it. Save it as docs/adr/0001-accounts-api-host.md in your portfolio repository.

docs/adr/0001-accounts-api-host.md (template)
# ADR 0001: Host for the Harbourline Accounts API

- **Status:** Proposed (date)
- **Deciders:** (names)

## Context
What the API does, its traffic shape (steady, spiky, overnight bursts), latency expectations,
availability target, who operates it, constraints (security, cost, team skills).

## Options considered
1. Elastic Beanstalk (single instance, or load balanced)
2. ECS on Fargate behind an ALB
3. Lambda behind an HTTP API

## Evidence
Your measured table, your cost model with its assumptions and date, and what you could not measure.

## Decision
We will run ... because ...

## Consequences
Good: ... Bad: ... Risks we accept: ... Follow-up work (HA, TLS, auth, WAF, alarms): ...

## Review trigger
We will revisit if requests exceed N per month, p99 exceeds N ms, or the team changes.

Your decision may be any of the three, or a split ("Fargate for the customer API, Lambda for the overnight partner endpoint"). A good ADR says what would make you change your mind.

Security considerations

⚠ Learning shortcut — not for production

All three stacks run the API with authentication disabled through an explicit override, serve over plain HTTP (Beanstalk and the ALB), put a Beanstalk instance in the default VPC, use one NAT gateway, have no WAF and delete data on destroy. The data is fictional and the stacks live for hours. Production: Auth__Mode=Cognito with issuer and client IDs, TLS everywhere (ACM certificates on the ALB, a custom domain on the API), AWS WAF in front of the ALB and Regional APIs where supported, private subnets and VPC endpoints, one NAT gateway per AZ if you keep NAT, retained data with deletion protection, alarms on 5xx, latency and throttling, and a break-glass process for changing the production parameter path.

  • Compare identities, not just URLs. Run aws iam list-role-policies and aws iam list-attached-role-policies for each host's role. The Beanstalk instance role and the Lambda execution role each carry an AWS managed policy for platform duties (AWSElasticBeanstalkWebTier; AWSLambdaBasicExecutionRole, which only writes logs) in addition to the app grant; the Fargate task role carries none, because the separate execution role pulls the image and writes logs. A role per host is the design; a shared role is how permissions creep.
  • One bucket of configuration, three delivery paths. Each host receives ParameterStore__Path as an environment variable and reads the key itself. No secret is baked into a zip, an image or a template.
  • Each host fails closed on a missing key. Delete the parameter and redeploy or restart one host to see the app refuse to start: that is the intended behaviour.
  • Throttle the public Lambda endpoint, and protect the public Beanstalk one. The HTTP API stage allows ten requests per second. The Beanstalk instance and the ALB have no limits, which is one more reason to destroy them the same day.
  • The probe sends a correlation header. Search for it in each host's logs; if you cannot find a request across the API, load balancer and application in a few minutes, tracing is not good enough for a bank.
  • Never claim compliance. The pipeline here shows controls (least privilege, no keys, immutable image tags, scan on push). Whether a design meets PCI DSS or UK GDPR obligations is a decision for your security, risk and legal functions.

Common mistakes

  • Deploying all three, measuring one. Then forgetting the other two are running. Use the destroy checklist and the tag query.
  • Comparing numbers from different networks or times of day. You will measure your Wi-Fi, not the hosts.
  • Reading one cold start as "the cold start". Cold starts vary; take several, and report a range.
  • Putting the Fargate cost in the wrong place. The NAT gateway and ALB dominate; compute is a small part. Say so.
  • Forgetting availability in the comparison. A single Beanstalk instance and a single Fargate task are cheap because they are not highly available.
  • Writing an ADR after the fact to justify a choice you already made. Write the options and the evidence first, decide second.
  • Skipping the tag check at the end. Destroyed stacks occasionally leave log groups, parameters or ENIs.

Troubleshooting

SymptomLikely causeFix
Tests fail locallyWrong SDK, or a test depends on a variable you setUse .NET 10 SDK; unset ParameterStore__Path and Pseudonymisation__SecretId
cdk deploy HlM03-Beanstalk says the stack does not existpublish/beanstalk.zip is missing, so the app skipped the stackRun Part 2 step 1
cdk deploy HlM03-Lambda says it is skippingpublish/lambda is missingRun Part 4
ebSolutionStack errorThe context value was not passed or the platform name is outdatedRe-run the list-available-solution-stacks query and pass the exact name
Beanstalk health "Severe", nginx 502App not listening on PORT, or the zip has a top-level folderRebuild the zip from inside publish/beanstalk
Fargate tasks restart in a loop, targets unhealthy/health/ready fails (table missing, key missing, wrong architecture image)Task logs in /hl-m03/accounts-api/ecs; push an arm64 image
CannotPullContainerErrorTag not pushed or no route to ECRaws ecr list-images; the NAT gateway must exist
Lambda returns {"message":"Internal Server Error"}Exception at start-up/hl-m03/accounts-api/lambda logs; usually the key parameter or IAM
Runtime.InvalidEntrypointLambda package built for the wrong architectureRepublish with -r linux-arm64
All hosts return 5xx at onceThe shared table or key is missingRe-run Part 1 step 3
Probe shows 429 from LambdaStage throttle (10 req/s) reachedRun only one probe at a time
Numbers are wildly different between runsNetwork noise, laptop sleep, VPNRepeat at a quieter time; drop outliers only with a stated rule
AccessDeniedException ... ssm:GetParametersByPathThe configured path and the IAM resource differBoth are /hl-m03/accounts-api/

Cost and cleanup

Destroy in the same sitting. Expect the Fargate stack's NAT gateway and ALB to be the largest part of the bill for the whole project, and the reason the destroy list below is one command.

cd infra/cdk
cdk destroy HlM03-Lambda HlM03-Fargate HlM03-Beanstalk HlM03-Registry HlM03-Shared -c owner=$OWNER --force
aws ssm delete-parameter --name /hl-m03/accounts-api/Pseudonymisation/Key
cd ../.. && rm -rf publish out.json

# Nothing tagged for this project should remain (some resources take minutes to disappear)
aws resourcegroupstaggingapi get-resources \
  --tag-filters Key=Project,Values=cea-lab Key=Lab,Values=m03-accounts-api \
  --query "ResourceTagMappingList[].ResourceARN"
# Belt and braces
aws ec2 describe-nat-gateways --filter Name=state,Values=available --query "NatGateways[].NatGatewayId"
aws elbv2 describe-load-balancers --query "LoadBalancers[].LoadBalancerName"
aws elasticbeanstalk describe-environments --query "Environments[?Status!='Terminated'].EnvironmentName"
aws lambda list-functions --query "Functions[?starts_with(FunctionName, 'hl-m03')].FunctionName"

If you deleted publish/ before destroying, the Beanstalk and Lambda stacks are not part of what the CDK app synthesises: delete them with aws cloudformation delete-stack --stack-name HlM03-Beanstalk (and HlM03-Lambda). If you also used the Terraform in infra/terraform, run terraform destroy -var owner=$OWNER. The CDK bootstrap stack CDKToolkit stays; it costs cents per month. Check Billing → Cost Explorer the next day as a final proof (filter by the tag Project=cea-lab if you have activated it as a cost allocation tag; otherwise look at the daily total by service).

Exercises

  • 🟢 Guided: Compare your prediction from Part 1 step 4 with the measured table. For each wrong prediction, write one sentence on why.
  • 🟡 Challenge: Change the cost model's assumptions: 200 ms average duration, 512 MB Lambda memory, and a VPC-endpoint design for Fargate without NAT (you must price the endpoints yourself). Recompute both break-even points. How sensitive is the decision to each assumption?
  • 🔴 Live problem: Harbourline's partner team says: "the Accounts API must be highly available across two Availability Zones, answer 99% of requests within 300 ms, and cost under USD 150 per month for 20 million requests." Recommend a host, say what extra design you would add (and price it), and say which of your measurements you would need to repeat under real load before signing off.

Assignment

Publish a repository (or folder in your portfolio) with: your measured table and the conditions you ran it under; the cost model as a small file you can re-run (a spreadsheet, or a script that takes request volume, duration and memory and prints monthly cost per host); the one-page comparison; and docs/adr/0001-accounts-api-host.md. Add a section "What would change in a real bank?" covering TLS and WAF, authentication, multi-AZ, accounts and environments, and who must approve the host choice.

Solutions

Knowledge check

Interview questions

  • You have an API with unpredictable traffic. How do you choose between Lambda and Fargate? Measure cold starts and warm latency, model cost against the expected request range with stated assumptions, check availability and operational burden, and write the decision down with a review trigger. Spiky and idle favours Lambda; steady and latency-sensitive favours Fargate; the break-even is specific to the workload.
  • What does Elastic Beanstalk give you over raw EC2, and what does it hide? Provisioning, health reporting, log streaming, managed updates and a deployment mechanism for your zip. It hides real EC2, security group, load balancer and Auto Scaling resources that still exist in your account and still bill.
  • How do you keep three environments' permissions consistent? One policy definition (a helper or module) applied to each environment's role, tested by listing the resulting policies, plus alarms or Config rules for drift.

Certification practice

Completion checklist

  • Tests pass (71 passed, 1 skipped) before I deployed anything
  • All three hosts answered /health/ready and the same account request
  • I measured with one probe, one network, three rounds, and recorded the conditions
  • My cost model states every assumption and price date, with a break-even figure
  • I wrote the one-page comparison and an ADR with a review trigger
  • I destroyed all stacks, deleted the parameter, and the tag, NAT and load balancer checks returned nothing

Key takeaways

  • A host is a bundle of trade-offs: packaging, networking, scaling, availability, cost shape and operational burden. The code is the same; everything around it differs.
  • Measure with a controlled method and disclose its caveats; do not quote latency without saying how you got it.
  • Cost has a fixed part and a variable part; the break-even between them is the number that matters, and it moves with your assumptions.
  • Cheap and unavailable are different from cheap and available: always put availability in the comparison.
  • An ADR is a record of the evidence and the conditions for changing your mind, not a justification.

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