Module 3 cheat sheet
One-page revision summary for .NET Application Development on AWS: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.
Assumes: .NET 10 LTS · AWS SDK for .NET v4 · AWS CLI v2 · Lambda dotnet10 · Region us-east-1 · facts as stated in the Module 3 lessons; items marked VERIFY there are not repeated as certain here. Verified against official sources on 2026-11-18.
A printable summary of Module 3. Detail lives in the linked lessons.
Key services
| Service | What it is for |
|---|---|
| AWS SDK for .NET v4 | Typed clients; credentials from the default chain, never from config files (SDK) |
| ECS on Fargate + ALB | Default host for a steady HTTP API (Fargate) |
| Elastic Beanstalk | Managed EC2 + ALB + ASG; .NET 10 on Amazon Linux 2023 or Windows/IIS (Beanstalk) |
Lambda (dotnet10) | Spiky or event-driven code, or a whole ASP.NET Core app (Lambda) |
| ECS Express Mode | Fastest container-to-HTTPS path; replaces App Runner for new accounts (hosting) |
| Amazon ECR | Private image registry: immutable tags, scan on push, lifecycle (ECR) |
| Parameter Store / AppConfig | Settings, and gradual feature-flag rollout (config) |
| Secrets Manager | Credentials with rotation and cached reads (secrets) |
| Cognito | Token issuer; your API validates the JWT (auth) |
| SQS / EventBridge Scheduler | Queued and scheduled work (background) |
| CloudWatch Logs | Structured JSON logs, queried with Logs Insights (logging) |
| AWS Transform for .NET | Agentic porting of .NET Framework code (porting) |
.NET / Azure to AWS
| Microsoft / Azure | AWS |
|---|---|
| IIS on a VM | EC2 behind an ALB (Linux + Kestrel is cheaper) |
| App Service | Elastic Beanstalk or ECS Express Mode |
| Container Apps / AKS | ECS on Fargate / EKS |
| Azure Functions | Lambda |
| Container Registry | ECR |
| Managed identity | IAM role on the task, instance or function |
| App Configuration / Key Vault | Parameter Store + AppConfig / Secrets Manager |
| Application Insights logging | CloudWatch Logs (+ X-Ray, OpenTelemetry) |
| Worker / WebJobs | Worker Service on Fargate, Lambda, EventBridge Scheduler |
| Upgrade Assistant | .NET Upgrade Assistant + AWS Transform for .NET |
Most useful CLI commands
| Task | Command |
|---|---|
| Who am I? | aws sts get-caller-identity --profile learn-sandbox |
| Sign in with SSO | aws sso login --profile learn-sandbox |
| ECR login | aws ecr get-login-password | docker login --username AWS --password-stdin ACCOUNT.dkr.ecr.us-east-1.amazonaws.com |
| Build and push arm64 | docker buildx build --platform linux/arm64 -t REPO:TAG --push . |
| Scan findings | aws ecr describe-image-scan-findings --repository-name NAME --image-id imageTag=TAG |
| Roll the ECS service | aws ecs update-service --cluster C --service S --force-new-deployment |
| Wait for stability | aws ecs wait services-stable --cluster C --services S |
| Tail logs | aws logs tail LOG_GROUP --follow |
| Read parameters | aws ssm get-parameters-by-path --path /app/ --with-decryption |
| Read a secret | aws secretsmanager get-secret-value --secret-id NAME |
| Invoke a function | aws lambda invoke --function-name NAME out.json |
| CDK deploy and destroy | cdk deploy STACK · cdk destroy STACK |
| Find leftovers | aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab |
Key limits and defaults
| Item | Value |
|---|---|
| Lambda runtime | dotnet10, deprecation scheduled 2028-11-14; dotnet8 deprecated 2026-11-10 |
| Lambda memory / timeout | 128 to 10,240 MB (CPU scales with memory) / 900 s |
| Lambda payload, sync | 6 MB each way |
| Lambda default concurrency | 1,000 per Region (soft quota) |
| ALB health check defaults | 30 s interval, 5 s timeout, 5 healthy / 2 unhealthy thresholds, path /, code 200 |
| ALB deregistration delay | 300 s |
| ECS health check grace period | Default 0; set it past start-up time |
| ECS container health check | 30 s interval, 5 s timeout, 3 retries, startPeriod off |
| Smallest Fargate task | 0.25 vCPU with 512 MiB; 20 GB ephemeral storage included |
| SDK v4 retries | Standard mode; MaxErrorRetry 3 means 1 attempt plus 3 retries |
| SQS visibility timeout | Default 30 s, maximum 12 hours; long poll up to 20 s |
| Parameter Store value size | 4 KB standard, 8 KB advanced |
| Secrets Manager | USD 0.40 per secret per month; staging label AWSCURRENT is the default read |
| ECR basic scanning | At most one scan per image per 24 h; enhanced (Inspector) rescans continuously |
Decision rules
| If... | Then... |
|---|---|
| New steady HTTP API | ECS on Fargate in private subnets behind an ALB |
| Spiky, event-driven, short work | Lambda |
| Want containers with no infrastructure design | ECS Express Mode |
| .NET Framework or IIS app, not ported yet | EC2 Windows or Beanstalk Windows; plan a port |
| Org standard is Kubernetes | EKS (control plane bills hourly) |
| Secret, rotated | Secrets Manager with caching; not an environment variable |
| Plain setting or flag | Parameter Store or AppConfig |
| Slow or scheduled work | Queue plus worker, or EventBridge Scheduler; not a timer in the web process |
| Health endpoint | Liveness with no dependencies; readiness may check the database |
| Per-call deadline | Tighter than SDK defaults for user-facing APIs |
Common exam traps
- Explicit config beats the default chain: a stale key in
appsettingsoverrides the task role. - Task role vs execution role: the execution role pulls the image and writes logs; the task role is what your code uses.
- Singleton clients: register SDK clients as singletons; transient clients exhaust sockets.
- Beanstalk creates real resources (EC2, ALB, ASG) you can see and pay for.
- Liveness must not check the database, or a database blip makes ECS replace every task.
- ALB fails open when all targets are unhealthy, but ECS still replaces the tasks.
- SnapStart applies to published versions only, not
$LATEST. - Lifecycle policies can delete an image a running task needs.
- A JWT must be validated for issuer,
token_use, client ID and scopes, not just signature. - At-least-once delivery: SQS consumers must be idempotent.
Cost traps
| Trap | Avoid it by |
|---|---|
| Idle ALB and NAT gateway after a lab | Tear down the same day; check with the tag query |
| Fargate left running | cdk destroy; Fargate bills per second with a one-minute minimum |
| Beanstalk load-balanced environment | Use single-instance for labs, then terminate |
| Secrets Manager secrets for every setting | Parameter Store for non-secrets |
| Enhanced ECR scanning on every repo | Enable where the risk justifies it |
| CloudWatch Logs ingestion | Log levels, retention, no payload dumps |
| EKS or ElastiCache for a lab | Design-only; use ECS and local Valkey in Docker |
Labs 3.4, 3.5 and the project at a glance
| Topic | Remember |
|---|---|
| One binary, three hosts | AddAWSLambdaHosting(LambdaEventSource.HttpApi) is a no-op outside Lambda; handler string is the assembly name; publish -r linux-arm64 --self-contained false (Lab 3.4) |
| Reading a cold start | Init Duration in the REPORT line (Logs Insights field @initDuration); SnapStart shows Restore Duration and needs a published version |
| Config layer order | appsettings, environment, Parameter Store, AppConfig: later wins (Lab 3.5) |
| Parameter path | The configured prefix is stripped and / becomes :; the path is also the IAM boundary |
| Secret cache | SecretsManagerCache calls DescribeSecret and GetSecretValue once per TTL; grant both on one secret ARN |
| Rotating a pseudonymisation key | Changes every derived reference; carry a key id in the output |
| Host comparison | Measure with one probe, one network, several rounds; calculate cost with a stated model and a break-even (project) |
Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.
Module project: 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.
Module 4: API Development & Integration
Design, publish, secure and operate APIs on AWS, and integrate safely with partners, AWS services and on-premises banking systems. You finish by building an Account Information API where each customer can see only their own accounts, protected by Cognito, WAF and throttling.