Skip to Content
Cloud Engineering Academy

Decision trees: which service when?

Flowcharts, comparison tables and plain guidance for the six choices .NET banking teams argue about most — messaging, .NET hosting, databases, IaC tools, API front doors and configuration/secrets.

Assumes: .NET 10 LTS · AWS service availability as of 2026-11-17. Verified against official sources on 2026-11-17.

AWS often has two or three services that look like they do the same job. These trees give you a sensible default and the questions that should move you off it. They are starting points for a design discussion, not a substitute for your organisation's standards, a cost estimate and a security review.

How to read the flowcharts: start at the top, answer each question honestly for this workload (not the whole bank), and stop at the first box that fits. If two boxes fit, pick the one with less to operate.

Limits and prices quoted below were checked on the date at the top of the page; re-check the official pages before relying on a number.

A. SQS vs SNS vs EventBridge vs Kinesis vs MSK vs Amazon MQ

SQSSNSEventBridgeKinesis Data StreamsMSKAmazon MQ
ShapeQueue (point-to-point)Topic (push fan-out)Event bus (rule-based routing)Ordered stream (shards)Kafka cluster (partitions)Classic message broker
ConsumersPoll; each message handled by one consumerPushed to every subscriberDelivered to each matching targetMany independent readersMany consumer groupsQueues and topics
OrderingFIFO per message group (FIFO queues only)FIFO topics availableNo ordering guaranteePer shardPer partitionPer queue
ReplayNo (once deleted, gone)NoArchive and replayYes, within retention (24 h default, up to 365 days)Yes, within retentionLimited
Ops effortNoneNoneNoneLow (on-demand mode) or shard sizingMedium (Serverless) to high (provisioned)Medium — broker instances, patch windows
Azure ≈Service Bus queue / MSMQService Bus topicEvent GridEvent HubsEvent Hubs Kafka / ConfluentService Bus (AMQP) / RabbitMQ

Guidance

  • Default for "do this work later, reliably": SQS standard + a dead-letter queue. It replaces MSMQ and most Service Bus queue use. Make consumers idempotent — standard queues can deliver a message twice.
  • Payments that must stay in order per account: SQS FIFO with MessageGroupId = accountId. Order is kept per account while different accounts process in parallel.
  • One event, many interested services (e.g. "PaymentSettled" → notifications, ledger, analytics): EventBridge if you want content-based routing and replay; SNS → SQS if you just need fast, cheap fan-out. Either way, put an SQS queue in front of each consumer so a slow or broken consumer doesn't lose events.
  • Card-transaction streams for near-real-time fraud signals: Kinesis Data Streams (simpler, AWS-native) or MSK (if the bank already runs Kafka). MSK Serverless is available and expanding to more Regions in 2026; check your Region.
  • Core banking adapters or vendor products that require JMS/AMQP: Amazon MQ. Don't choose it for new cloud-native code — it is a broker you size and patch.
  • Large messages: SQS, SNS and EventBridge payload limits were all raised to about 1 MB during 2025–2026, but large events are billed in 64 KB chunks and slow every consumer. For documents and files, store the payload in S3 and send a reference (the "claim-check" pattern).
  • Go deeper: Module 8 — Messaging & microservices.

B. Lambda vs ECS Fargate vs EC2 vs Elastic Beanstalk vs App Runner vs EKS for .NET

LambdaECS on FargateEC2Elastic BeanstalkApp RunnerEKS
Status (2026-11-17)Current; managed dotnet10 runtimeCurrent; ECS Express Mode for quick startCurrentCurrent; regular .NET platform updatesClosed to new customers since 2026-04-30Current
Unit you deployFunction (zip or container image)Container image (task)Server (AMI)App bundle (zip)Container image or sourceContainer image (pod)
Max run time15 minutes per invocationUnlimitedUnlimitedUnlimitedUnlimitedUnlimited
Scale to zeroYesNo (min 1 task for a service)NoNoNo — idle instances billed for memory onlyNo
Cold startsYes — mitigate with SnapStart, Native AOT, provisioned concurrencyTask start time on scale-outInstance boot timeInstance boot timeLowPod start time
.NET Framework / WindowsNoWindows containers supported (slower, OS licence fee)YesYes (Windows/IIS platform)NoWindows nodes possible
You manageCode, memory, concurrencyImage, CPU/memory, networkingOS, patching, IIS, scalingApp + some platform choicesAppCluster add-ons, upgrades, manifests
Cost shapePer request + msPer vCPU/GB-second while runningPer instance-hourUnderlying EC2 + ALBPer vCPU/GB while activeControl-plane hour + nodes/Fargate
Azure ≈FunctionsContainer AppsVirtual MachinesApp ServiceContainer AppsAKS

Guidance

  • Default for a modern ASP.NET Core API in a bank: ECS on Fargate behind an ALB, in private subnets. Predictable latency, no cold starts on steady traffic, long-running BackgroundService workers run the same way. Use ECS Express Mode to get there quickly; it creates ordinary ECS resources you can take over later.
  • Lambda shines for event handlers (SQS, EventBridge, S3, schedules) and low or spiky traffic APIs. Watch the 15-minute limit, connection pooling to relational databases (use RDS Proxy) and cold starts. ASP.NET Core can run inside Lambda, but a whole monolith in one function is rarely a good idea.
  • EC2 Windows / Elastic Beanstalk (Windows) are your rehost path for .NET Framework, WCF and IIS-specific apps while you port them with AWS Transform (the replacement for Porting Assistant for .NET, which closed to new customers on 2025-11-07).
  • App Runner: if you are not already an App Runner customer you cannot onboard. Existing customers can keep using it (no new features); AWS publishes a migration guide to ECS Express Mode.
  • EKS only when Kubernetes is an organisational standard with a platform team — it adds the most operational work for a .NET team.
  • Go deeper: Module 3 — .NET on AWS.

C. RDS (SQL Server / PostgreSQL) vs Aurora vs DynamoDB vs ElastiCache

RDS for SQL ServerRDS for PostgreSQLAurora PostgreSQLDynamoDBElastiCache
ModelRelational, T-SQLRelational, PostgreSQLRelational, PostgreSQL-compatibleKey-value / documentIn-memory key-value
HAMulti-AZ standbyMulti-AZ (one standby or two readable standbys)Storage across 3 AZs; replicas as failover targetsBuilt in across AZs; global tables multi-RegionReplicas + Multi-AZ failover
ScalingVertical + read replicas (edition limits apply)Vertical + read replicasUp to 15 replicas, Serverless v2Practically unlimited, on-demandShards / serverless
Licence costSignificant (licence-included)NoneNoneNoneNone
EF CoreYes (SqlServer provider)Yes (Npgsql)Yes (Npgsql)No — use the AWS SDK object persistence modelNo — IDistributedCache / StackExchange.Redis
Banking fitRehost/replatform of existing SQL Server appsNew relational servicesCore relational services needing HA/scaleIdempotency keys, sessions, high-volume lookups, event storesCaching reads, rate limits, sessions
Azure ≈Azure SQL MIAzure DB for PostgreSQLAzure SQL Hyperscale / PostgreSQL FlexibleCosmos DBAzure Cache for Redis

Guidance

  • Migrating an existing SQL Server app quickly: RDS for SQL Server. Least change; budget for licence-included pricing and check feature gaps (no sysadmin, limited server-level features).
  • New relational services: PostgreSQL (RDS for cost and simplicity, Aurora for faster failover, read scaling and Global Database). Moving off SQL Server removes licence cost but is a real migration — use DMS + DMS Schema Conversion, and consider Babelfish (available and actively updated) if rewriting T-SQL is the blocker.
  • DynamoDB is excellent where you know the access patterns up front: idempotency tables, payment status by ID, customer sessions. It is a poor fit for ad-hoc reporting or many-table joins — stream changes to S3/Athena for that.
  • ElastiCache is never the system of record for balances or ledgers.
  • Also on the menu: Aurora DSQL (distributed, PostgreSQL-compatible, multi-Region active-active) for specialist cases — evaluate PostgreSQL feature compatibility first.
  • Go deeper: Module 6 — Databases.

D. CloudFormation vs CDK vs Terraform

CloudFormationCDK (C#)Terraform
LanguageYAML / JSONC#, TypeScript, Python, Java, GoHCL
StateManaged by AWS (the stack)Managed by AWS (CloudFormation stacks)Your state file — S3 with locking, encrypted, versioned
PreviewChange setscdk diffterraform plan
DriftDrift detectionVia CloudFormationShown by plan
New AWS featuresUsually day one, sometimes laterSame as CloudFormation (L1); L2 constructs may lagProvider releases; usually quick
Multi-accountStackSetsCDK Pipelines / StackSetsWorkspaces / per-account state
Policy checkscfn-guard, cfn-lint, Checkovcdk-nag, unit tests with Amazon.CDK.AssertionsCheckov, tflint, OPA/Sentinel
LicenceAWS serviceApache-2.0Terraform: BSL 1.1; OpenTofu: MPL-2.0
Azure ≈ARMBicep (but real C#)Terraform azurerm

Guidance

  • For a .NET team building AWS-only systems, CDK in C# is the most natural: same language, same IDE, real tests. Add cdk-nag so templates are checked against AWS Solutions / NIST / PCI rule packs before deploy.
  • Terraform is the right answer when the bank already uses it, needs one tool across clouds, or has a platform team publishing Terraform modules. Treat the state file as sensitive (it can contain secrets) and lock it.
  • Plain CloudFormation suits small, stable stacks, Service Catalog products and organisation-wide StackSets — and you will read it anyway because CDK produces it.
  • Whatever you pick: one tool per stack, no console changes in production, change review in pull requests, and drift checks on a schedule.
  • Go deeper: Module 10 — Infrastructure as code.

E. API Gateway REST vs HTTP API vs ALB

API Gateway REST APIAPI Gateway HTTP APIALB
PricingPer million requests (highest)Per million requests (lower)Per hour + capacity units (cheap at high steady volume)
Auth optionsIAM, Cognito, Lambda authorizers, mTLS, resource policiesJWT authorizer (built in), IAM, Lambda authorizers, mTLSOIDC/Cognito authentication action, mTLS; app does the rest
Throttling / quotasStage/method throttling, usage plans + API keysRoute-level throttling; no usage plansNone built in — use WAF rate-based rules
AWS WAFYesNot directly — put CloudFront + WAF in frontYes
Request validation / transformsModels, validators, mapping templatesParameter mapping onlyNone
Private (internal-only)Private REST APIs via interface endpointNo private endpoint type; private integrations via VPC LinkInternal ALB
CachingBuilt-in cache (paid)NoNo (use CloudFront)
Integration timeout29 s default; can be raised via Service Quotas for Regional and private APIs (may lower your throttle quota)30 s maxConfigurable idle timeout (long requests OK)
Azure ≈API ManagementAPI Management (consumption tier, roughly)Application Gateway

Guidance

  • Public banking APIs with partners (Open Banking-style): REST API — usage plans per partner, WAF, request validation, mTLS, access logs. Authorisation still happens in your service ("this customer can see only their own accounts").
  • Internal or Lambda-backed APIs that just need JWT checks: HTTP API — cheaper and lower latency.
  • High, steady traffic to ECS services, or WebSockets/gRPC/long requests: ALB in front of the services, with WAF. You can still put API Gateway in front via VPC Link if you need API-management features.
  • API keys are for identifying callers for quotas, never for authenticating them.
  • Go deeper: Module 4 — APIs & integration.

F. Secrets Manager vs Parameter Store vs AppConfig

Secrets ManagerParameter StoreAppConfig
PurposeCredentials and secretsConfig values and simple secretsFeature flags and dynamic configuration
EncryptionAlways KMSSecureString via KMSAt rest with KMS
RotationBuilt in (Lambda-based; managed for RDS and others)Nonen/a
Rollout safetyVersions and staging labelsVersionsValidators, deployment strategies, alarm-based rollback
Cost (check pricing page)Per secret per month + per API call (≈ $0.40/secret/month)Standard tier free; advanced tier per parameterPer configuration request/received
SizeUp to 64 KB4 KB standard, 8 KB advancedLarger configuration documents
.NET accessAWSSDK.SecretsManager + caching libraryAmazon.Extensions.Configuration.SystemsManager → IConfigurationSame configuration provider, or AppConfig Agent / Lambda extension
Azure ≈Key Vault secretsApp Configuration (key-values)App Configuration feature flags

Guidance

  • Database passwords and partner API keys: Secrets Manager with rotation, fetched at runtime by the task/function role, cached in memory. Never in appsettings.json, environment variables in plain text, or the container image.
  • Environment configuration (URLs, timeouts, queue names): Parameter Store under a path like /payments/prod/, loaded into IConfiguration at start-up.
  • Feature flags and settings you change while running (e.g. switch a fraud rule on for 10% of traffic): AppConfig, with an alarm that rolls back automatically.
  • Use customer managed KMS keys for production secrets so access is controlled by key policy and every decrypt is in CloudTrail.
  • Go deeper: Module 3 — .NET on AWS and Module 5 — Security.

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