Ravindra BagaleCourses & study guides Track your progress

AWS Cloud

AWS Difference Between Interview Questions: Compute, Storage and Database Comparisons with Tables (Lambda vs EC2, S3 vs EBS, RDS vs DynamoDB) (50 Questions)

This page has 50 AWS comparison interview questions on compute, storage and databases. Every answer has a short table and a "when to pick which" line, because that is exactly how a good interview answer to "what is the difference between X and Y?" should sound.

1. An everyday example: choosing a vehicle

Why do interviewers love "difference between" questions?

They show whether you understand what each service is for, not just its name. A good answer compares on a few clear points and ends with a decision for a real situation.

Choosing between AWS services is like choosing a vehicle. A scooter (Lambda) is perfect for short trips, a car you own (EC2) goes anywhere but needs maintenance, and a taxi (Fargate) takes you there without owning anything. None is "best"; each wins for a certain trip.

How to use this page

  • For each pair, learn the table's three or four rows and the final "pick" line.
  • In interviews, start with one sentence on what each service is, then compare, then decide.
  • Prices and limits change; the tables describe how services work, not exact numbers.

2. Fresher level questions

Start here if you are a fresher or have less than two years of experience. Try to answer each question aloud first. Then open it and compare.

Q1. Lambda or EC2: how do they differ for running application code, and when do you pick each? Fresher
PointLambdaEC2
What you manageOnly code and settingsOS, patching, scaling, runtime
Run timeUp to 30 minutes per on-demand Event Function invocationRuns as long as you want
ScalingAutomatic per requestAuto Scaling groups you configure
BillingPer request and per ms of durationPer second while running

Pick Lambda for event-driven, spiky or short tasks (API backends, file processing, schedules). Pick EC2 for long-running processes, special OS or hardware needs, or steady high load where always-on servers are cheaper.

Q2. Amazon S3 or Amazon EBS: what is the real difference, and where does each fit? Fresher
PointS3EBS
TypeObject storage over HTTPS APIBlock storage, a disk for one instance
AccessFrom anywhere with permissionAttached to an EC2 instance in one AZ
ScalePractically unlimitedFixed size you provision (can grow)
UseFiles, backups, data lakes, static assetsOS disks, databases, apps needing a file system

Pick S3 for files that many systems read or that must last cheaply. Pick EBS when an application needs a local disk with low latency, such as a database on EC2.

Q3. Should a simple company website run on S3 static hosting or on an EC2 web server? Fresher
PointS3 (with CloudFront)EC2 web server
ContentStatic only: HTML, CSS, JS, imagesStatic and server-side code (PHP, Node, Java)
OperationsNo servers to patchYou patch, monitor and scale
AvailabilityVery high by defaultDepends on your design (multi-AZ, load balancer)
Cost at low trafficVery lowAn instance runs all the time

Pick S3 plus CloudFront for brochure sites, documentation and single-page apps calling APIs. Pick EC2 (or containers) when pages are generated on the server or need a CMS like WordPress.

Q4. Amazon S3 or Amazon EFS for files that several servers need: how do you decide? Fresher
PointS3EFS
InterfaceAPI calls (GET, PUT) or SDKNormal file system (NFS mount)
File changesReplace whole objectsEdit part of a file, lock files
LatencyHigher per requestLower, file-system style
Cost per GBLowerHigher

Pick S3 when the application can use the S3 API (uploads, media, exports). Pick EFS when existing software expects a shared POSIX directory and cannot be changed.

Q5. Amazon RDS or DynamoDB: how do you explain the choice to a fresher-level interviewer? Fresher
PointRDSDynamoDB
ModelRelational tables, SQL, joinsKey-value and document items, no joins
ScalingBigger instance, read replicasAutomatic, very large scale
SchemaFixed columnsFlexible attributes per item
QueriesAny SQL queryBy key or index, designed in advance

Pick RDS when data is relational and queries change often (ERP, banking, reports). Pick DynamoDB for known access patterns at high scale with predictable low latency (carts, sessions, IoT, gaming).

Q6. For a MySQL application, what changes in daily operations if you move from RDS for MySQL to Aurora MySQL? Fresher
PointRDS (MySQL/PostgreSQL)Aurora
StorageEBS per instanceShared cluster volume, six copies across three AZs
ReplicasUp to a smaller number, with replication lagUp to 15 low-lag readers on the same storage
FailoverTypically one to two minutes (Multi-AZ instance)Usually faster, to a reader
CostLower for small workloadsHigher instance price, pay for I/O or I/O-Optimized

Pick RDS for small or cost-sensitive databases, and engines Aurora does not support. Pick Aurora for busy production databases that need fast failover, many readers or global replication.

Q7. Golden AMI versus launch template: what belongs in each when you build an Auto Scaling group? Fresher
PointAMILaunch template
What it isThe disk image: OS, software, block device mappingThe full launch settings
ContainsRoot volume snapshot and settingsAMI ID, instance type, key, security groups, user data, IAM profile, tags
VersionsNew AMI for each changeNumbered versions of one template
Used byAny launchAuto Scaling groups, EC2 Fleet, console and CLI launches

Pick both together: bake software into the AMI, and describe how to launch it in a launch template that the Auto Scaling group uses.

Q8. Stop, hibernate or terminate an EC2 instance: what is the difference? Fresher
ActionRAM contentsEBS root volumeBilling for instance
StopLostKeptStops (EBS still billed)
HibernateSaved to the root EBS volume and restoredKeptStops (EBS still billed)
TerminateLostDeleted by defaultStops for good

Pick stop for servers you need again later. Pick hibernate for apps with long warm-up times (large in-memory caches) where supported. Pick terminate for anything you can rebuild from an AMI or code. Instance store data is lost in all three.

Q9. Burstable T instances or fixed-performance M instances: which should a small web app use? Fresher
PointT family (t3, t4g)M family (m6i, m7g)
CPUBaseline plus burst creditsFull CPU all the time
Good forLow average CPU with short spikesSteady CPU use
RiskSlows to baseline when credits run out (standard mode) or extra charges (unlimited mode)Paying for CPU you do not use

Pick T for dev, test and small sites with idle time. Pick M (or C for compute-heavy) when CPU stays high; watch CPUCreditBalance to know when you have outgrown T.

Q10. Virtual machines, containers and functions on AWS: how do you compare them? Fresher
PointEC2 (VMs)ECS/EKS (containers)Lambda (functions)
UnitWhole serverPackaged app with its dependenciesOne function
Start timeMinutesSecondsMilliseconds to seconds
ControlMostMediumLeast
Ops workMostMediumLeast

Pick VMs for legacy or special software, containers for long-running services and microservices with consistent packaging, and functions for event-driven glue and spiky APIs.

Q11. Object, block and file storage: what is the difference, with AWS examples? Fresher
TypeHow it is usedAWS service
ObjectWhole objects by key over an APIS3
BlockRaw disk blocks, formatted with a file system by one serverEBS, instance store
FileShared folders and files over NFS or SMBEFS, FSx

Pick object storage for scale and cheap durability, block for databases and boot disks, and file storage when many servers or users need the same directory tree.

Q12. FSx for Windows File Server or EFS: which one for a Windows application? Fresher
PointFSx for WindowsEFS
ProtocolSMBNFS (Linux)
IdentityActive Directory, NTFS permissionsPOSIX users, IAM, access points
ClientsWindows (and Linux with SMB)Linux

Pick FSx for Windows for any Windows workload or user shares. EFS does not support Windows clients, so it is the choice only for Linux.

Q13. S3 Glacier Instant Retrieval, Flexible Retrieval or Deep Archive: how do you choose? Fresher
PointInstant RetrievalFlexible RetrievalDeep Archive
First byteMillisecondsMinutes to hours (restore)Hours (restore)
Storage costLowLowerLowest
Typical accessAbout once a quarterOnce or twice a yearRarely, compliance
Minimum storage90 days90 days180 days

Pick Instant Retrieval when rare reads must still be immediate, Flexible for backups you might restore in hours, and Deep Archive for records kept for years.

Q14. Horizontal or vertical scaling for an EC2 application: what are the trade-offs? Fresher
PointVertical (bigger instance)Horizontal (more instances)
HowChange instance typeAuto Scaling group behind a load balancer
DowntimeUsually a stop and startNone, instances added and removed
LimitLargest instance sizePractically none
RequirementNoneApp must be stateless or share state

Pick vertical for quick relief or databases that cannot scale out easily. Pick horizontal for web and API tiers, because it also gives high availability across AZs.

Q15. Aurora or Redshift: why not use one for everything? Fresher
PointAuroraRedshift
WorkloadOLTP: many small reads and writesOLAP: large scans and aggregations
Storage formatRow-basedColumnar, compressed
Typical queryGet or update one orderSales by region by month for 5 years
ConcurrencyThousands of short transactionsFewer, heavier queries

Pick Aurora for the application's live data and Redshift for reporting and analytics, with data moved between them (for example zero-ETL integration).

Q16. DynamoDB or ElastiCache: are they interchangeable for fast lookups? Fresher
PointDynamoDBElastiCache (Valkey/Redis OSS)
RoleDurable primary databaseIn-memory cache or data structure store
LatencySingle-digit millisecondsSub-millisecond
DurabilityData stored across AZsMemory first; persistence options vary
Data typesItems with attributesStrings, hashes, sorted sets, streams

Pick DynamoDB when the data must be the source of truth. Pick ElastiCache to cache reads from another database, store sessions, or use structures like leaderboards and rate counters.

Q17. Lambda container images or .zip packages: which should you use? Fresher
Point.zip packageContainer image
Size limitSmaller (deployment package limits)Up to 10 GB
ToolingSimple upload or S3Docker build, push to ECR
LayersSupportedNot used (build everything into the image)
Best forSmall functions, quick editsLarge dependencies (ML libraries), existing container pipelines

Pick .zip for most small functions. Pick container images when dependencies are large or the team already builds and scans containers.

3. Mid level questions

These questions check how you use the service in real projects. Interviewers expect the why, the how and one real example.

Q18. Lambda or Fargate for a backend service: how do you decide? Mid level
PointLambdaFargate
UnitFunction per eventLong-running container tasks
Max durationUp to 30 minutes for on-demand Event FunctionsNo limit
ScalingPer request, to zeroTasks via service auto scaling, minimum usually one
ConnectionsShort-lived; database connection pooling needs RDS ProxyNormal connection pools
Cost patternCheap when idle, expensive at constant high loadSteady cost, efficient for steady load

Pick Lambda for spiky, event-driven work and low traffic. Pick Fargate for steady APIs, WebSockets, long jobs or apps already in containers.

Q19. ECS or EKS: which container platform would you choose for a new team? Mid level
PointECSEKS
APIAWS-specific, simpleKubernetes, portable
Learning curveLowHigh
EcosystemAWS integrationsHuge Kubernetes ecosystem (Helm, operators)
CostNo control plane feeControl plane fee per cluster
UpgradesManaged by AWSYou plan Kubernetes version upgrades

Pick ECS for small or AWS-only teams who want to ship quickly. Pick EKS when the company already uses Kubernetes, needs multi-cloud portability, or relies on Kubernetes tools.

Q20. Elastic Beanstalk or ECS on Fargate for deploying a web app? Mid level
PointElastic BeanstalkECS on Fargate
ModelPlatform that creates EC2, load balancer and scaling for youContainers you define in task definitions
ControlLimited; custom config through extensionsHigh: networking, sidecars, deployment strategies
PackagingUpload code for a supported platform (or Docker)Container images
FitSimple apps, small teamsMicroservices and modern pipelines

Pick Beanstalk to get a classic app online quickly with little AWS knowledge. Pick ECS on Fargate for containerised services you will grow. (App Runner is closed to new customers, so do not plan new work on it.)

Q21. Cluster, spread or partition placement groups: which one when? Mid level
TypeHow instances are placedUse
ClusterClose together in one AZLow latency, high throughput HPC
SpreadEach on separate hardware racks (limited count per AZ)Small number of critical instances
PartitionGroups (partitions) on separate racksLarge distributed systems like Kafka, HDFS, Cassandra

Pick cluster for tightly coupled compute, spread for a few servers that must not fail together, and partition for big clusters that understand rack awareness.

Q22. EC2 Image Builder or Packer for building golden AMIs: how do they compare? Mid level
PointEC2 Image BuilderPacker
TypeManaged AWS serviceOpen-source tool you run (in CI)
PipelinesBuilt-in schedules, components, tests, distribution to Regions and accountsYou script the pipeline in your CI system
Multi-cloudAWS only (plus container images)Many clouds and formats
PatchingCan rebuild automatically when base images updateYou trigger rebuilds

Pick Image Builder for AWS-only teams that want managed, scheduled, tested images. Pick Packer when you already use it or build images for several platforms from one template.

Q23. Graviton (Arm) or x86 instances: how do you decide for an existing app? Mid level
PointGraviton (Arm)x86 (Intel/AMD)
Price-performanceUsually better for many workloadsBaseline
CompatibilityNeeds Arm builds of code and dependenciesRuns everything built for x86
Good fitsJava, Node, Python, Go, containers, managed databasesWindows, binary-only vendor software, specific instruction sets

Pick Graviton for new services and interpreted or easily recompiled apps (build multi-arch images). Stay on x86 for software without Arm support, and test performance before switching.

Q24. EBS, EFS or FSx: which storage do you give a workload? Mid level
PointEBSEFSFSx
AccessOne instance (Multi-Attach rare)Many Linux clientsMany clients; Windows, Lustre, ONTAP, OpenZFS
ProtocolBlock deviceNFSSMB, Lustre, NFS, iSCSI
ScopeOne AZRegional (or One Zone)Single-AZ or Multi-AZ
Best forDatabases, boot disksShared Linux contentWindows shares, HPC, enterprise NAS features

Pick EBS for one server's fast disk, EFS for simple shared Linux storage, and FSx when you need a specific file system's features.

Q25. EFS or FSx for Lustre for a machine learning training job? Mid level
PointEFSFSx for Lustre
ThroughputGood, scales with Elastic modeVery high, built for parallel access
S3 integrationCopy data in yourselfLinked to S3 buckets, lazy load and export
LifetimeLong-lived shared storageScratch for jobs, or persistent
Cost modelPay per GB and throughputPay per provisioned capacity

Pick EFS for shared home directories, notebooks and smaller datasets. Pick FSx for Lustre when many GPU instances read a large dataset and storage speed limits training.

Q26. S3 Standard or Intelligent-Tiering for a new bucket with unknown access patterns? Mid level
PointStandardIntelligent-Tiering
Cost when data is hotLowest for frequent accessSimilar, plus a small monitoring fee per object
Cost when data turns coldSame as hotDrops automatically to lower tiers
Retrieval feesNoneNone for the automatic tiers
Small objectsNormalObjects under 128 KB are not monitored or moved

Pick Intelligent-Tiering when you cannot predict access and objects are larger than 128 KB. Pick Standard for short-lived or always-hot data, and lifecycle rules when the pattern is known.

Q27. S3 Express One Zone or S3 Standard: when is the faster class worth it? Mid level
PointS3 StandardS3 Express One Zone
LatencyTens of millisecondsSingle-digit milliseconds
ResilienceMultiple AZsOne AZ
Bucket typeGeneral purposeDirectory bucket
Storage costLowerHigher per GB, lower request cost

Pick Express One Zone for very request-heavy, latency-sensitive work next to compute in the same AZ (ML training, analytics scratch). Keep the durable copy in S3 Standard.

Q28. DynamoDB or DocumentDB for JSON data? Mid level
PointDynamoDBDocumentDB
APIDynamoDB API, PartiQLMongoDB-compatible API
QueriesKey and index basedRich queries, aggregation pipelines, ad-hoc filters
ScalingServerless, practically unlimitedInstance-based cluster (elastic clusters for sharding)
OpsAlmost noneChoose instances, manage capacity

Pick DynamoDB for known access patterns at very high scale. Pick DocumentDB when the app uses MongoDB drivers or needs flexible queries on documents.

Q29. ElastiCache or MemoryDB: what is the difference? Mid level
PointElastiCacheMemoryDB
Main roleCache in front of a databaseDurable in-memory primary database
DurabilityData can be lost on failures (replication helps)Multi-AZ transaction log, data survives failures
Write latencyLowestSlightly higher because of durable commit
APIValkey, Redis OSS, MemcachedValkey and Redis OSS compatible

Pick ElastiCache to speed up reads from another database. Pick MemoryDB when the in-memory store itself is the source of truth and data must not be lost.

Q30. Neptune or a relational database for relationship-heavy data? Mid level
PointRelational (RDS/Aurora)Neptune
ModelTables and joinsGraph: nodes and edges
Deep relationshipsMany joins or recursive queries, slow at depthFast traversals across many hops
Query languagesSQLGremlin, openCypher, SPARQL

Pick a relational database when relationships are simple and fixed. Pick Neptune for fraud rings, social networks, recommendations and knowledge graphs where you ask "friends of friends of friends" style questions.

Q31. OpenSearch or DynamoDB for a product search box? Mid level
PointDynamoDBOpenSearch
LookupsExact key and prefix on sort keyFull-text, fuzzy, relevance ranking
FiltersPlanned in key designAny field, facets, aggregations
RoleSource of truthSearch index fed from the source

Pick DynamoDB (or RDS) to store products, and stream changes into OpenSearch for search, typo tolerance and filters. Do not use DynamoDB scans for search.

Q32. Aurora Serverless v2 or provisioned Aurora instances: when does each make sense? Mid level
PointServerless v2Provisioned
CapacityScales in fine steps (ACUs) between a minimum and maximumFixed instance size until you change it
Best forVariable or unpredictable load, dev and test, many small databasesSteady, predictable load
Cost at steady high loadUsually higherUsually lower, and can use reserved pricing
MixingCan be readers or writer in the same cluster as provisionedSame

Pick Serverless v2 when load changes a lot or is unknown. Pick provisioned for steady production loads, and mix both (provisioned writer, serverless readers) when useful.

Q33. RDS Proxy or connection pooling inside the application? Mid level
PointApp-side poolRDS Proxy
WhereIn each app processManaged service between app and database
Works with LambdaPoorly: many short-lived processesWell: shares connections across invocations
FailoverApp must reconnectProxy keeps client connections, reconnects faster
ExtraFreeExtra cost; IAM auth and Secrets Manager integration

Pick app-side pools for long-running services with a stable number of instances. Add RDS Proxy for Lambda, many small app instances, or when you want faster, smoother failovers.

Q34. AWS Batch or Lambda for background jobs? Mid level
PointLambdaAWS Batch
DurationUp to 30 minutes for on-demand Event FunctionsHours or days
ResourcesUp to 10 GB memory, limited CPUAny EC2 or Fargate size, GPUs
SchedulingPer eventJob queues, priorities, dependencies, arrays
CostPer request and durationPay for EC2/Fargate used (Spot supported)

Pick Lambda for short, event-driven jobs. Pick Batch for large or long compute jobs (simulations, genomics, video rendering, big batch processing).

Q47. RDS Multi-AZ DB cluster or Aurora: both have readable standbys, so how do they differ? Mid level
PointRDS Multi-AZ DB clusterAurora cluster
EnginesRDS for MySQL and PostgreSQLAurora MySQL and PostgreSQL
TopologyOne writer and two readable standbys in three AZsOne writer and up to 15 readers
StorageLocal storage per instance, semi-synchronous replicationShared cluster volume across three AZs
Scale of readsTwo readersMany readers, auto scaling

Pick a Multi-AZ DB cluster when you want faster failover and two readers on standard RDS engines. Pick Aurora when you need more readers, global databases or Aurora-only features.

4. Senior level and scenario questions

These questions check design thinking and troubleshooting. Think aloud. Say what you check first, what you change, and how you prevent it next time.

Q35. Aurora Global Database or cross-Region read replicas for a multi-Region RDS design? Senior
PointCross-Region read replica (RDS)Aurora Global Database
ReplicationEngine-native, can lag more under loadStorage-level, typically about a second or less
Secondary RegionsPer replicaSeveral secondary Regions
RecoveryPromote replica (becomes standalone)Managed switchover and failover, endpoints preserved with global writer endpoint
Writes in secondaryNoWrite forwarding option

Pick cross-Region replicas for simple DR or reads on RDS engines. Pick Aurora Global Database for low RPO and RTO across Regions and global read traffic.

Q36. Aurora DSQL, DynamoDB global tables or Aurora Global Database for a multi-Region active-active app? Senior
PointDynamoDB global tablesAurora DSQLAurora Global Database
ModelKey-value, NoSQLDistributed SQL (PostgreSQL-compatible)Relational, one writer Region
Writes in many RegionsYesYesNo (forwarding to primary)
ConsistencyLast writer wins by default; a strong consistency option existsStrong consistency across RegionsStrong in primary, lagging readers elsewhere
MaturityLong provenNewer; check feature gapsProven

Pick DynamoDB global tables for NoSQL active-active. Consider DSQL for relational active-active after checking current feature support. Pick Aurora Global Database for one-writer DR and global reads.

Q37. Read replicas or a cache to scale reads for a busy product catalogue? Senior
PointRead replicasCache (ElastiCache)
FreshnessSeconds or less behindAs fresh as your TTL and invalidation
Query supportAny SQLOnly cached keys
LatencyDatabase latencySub-millisecond
EffortRoute reads in code or proxyCache logic and invalidation

Pick replicas when reads are varied and need full SQL. Pick a cache for repeated hot keys (product pages, prices). Busy systems often use both: cache first, replica on miss.

Q38. RDS or RDS Custom for an enterprise database: how do you decide? Senior
PointRDSRDS Custom (Oracle, SQL Server)
OS and database accessNoneYou can access the OS and customise the database
AutomationFull: patching, backups, failoverShared: AWS automates, you can pause automation
UseStandard appsApps needing custom agents, patches or settings that RDS blocks
RiskLowHigher: your changes can break automation

Pick RDS whenever the app can live with it. Pick RDS Custom only for packaged apps (such as some ERP systems) that need privileged access, before considering self-managed EC2.

Q39. For a 2-minute video encoding task triggered by uploads, Lambda, Fargate or AWS Batch? Senior
PointLambdaFargate taskAWS Batch
Fits durationYes (two minutes fits the on-demand timeout)YesYes
Heavy CPU/GPULimitedModerateBest (GPU, large instances, Spot)
Start-upFastTens of secondsQueue plus instance start
Burst of 10,000 uploadsScales quickly, watch concurrencyMany tasks, watch quotasQueues work, controls cost

Pick Lambda for light encodes and moderate volume. Pick Batch (or Fargate via a queue) for heavy encodes, GPU needs or very large bursts where cost control matters. AWS Elemental MediaConvert is also an option for standard video formats.

Q40. A game needs a real-time leaderboard for 5 million players. DynamoDB, ElastiCache or RDS? Senior
PointDynamoDBElastiCache sorted setsRDS
Top 100 queryNeeds a special index design; sorting all players is hardBuilt in (ZREVRANGE), very fastORDER BY with index, heavy at high write rate
Score updates per secondVery highVery highLimited by one writer
DurabilityDurableNeeds replication or a durable copyDurable

Pick ElastiCache (or MemoryDB for durability) sorted sets for the live leaderboard, and keep scores durable in DynamoDB. RDS fits small games or periodic batch rankings.

Q41. Containers need persistent storage on EKS. EBS, EFS or FSx? Senior
PointEBS (CSI driver)EFS (CSI driver)FSx (CSI drivers)
Access modeReadWriteOnce, one nodeReadWriteMany across nodes and AZsReadWriteMany
AZ scopePod must run in the volume's AZAny AZDepends on deployment
Best forDatabases, StatefulSetsShared content, uploadsHPC (Lustre), NetApp features (ONTAP)

Pick EBS for StatefulSets like databases with zone-aware scheduling, EFS for shared files across pods, and FSx for performance or enterprise NAS needs.

Q42. Should a SaaS product use one DynamoDB table for all tenants or one table per tenant? Senior
PointPooled tableTable per tenant
IsolationLogical (tenant ID in key, IAM leading-key conditions)Strong, per-table permissions
OperationsOne table to manageThousands of tables to create, monitor and back up
Noisy neighboursPossible; design keys and capacity wellIsolated capacity
Per-tenant restore or deleteHarderEasy

Pick pooled for many small tenants. Pick table per tenant (or a separate account) for large, regulated tenants who need strict isolation, often in a mixed model.

Q43. S3 replication or AWS Backup for protecting S3 data? Senior
PointS3 replicationAWS Backup for S3
PurposeLive copy in another bucket or RegionPoint-in-time recovery and long-term copies
Deletes and bad writesCan replicate them tooRestore to before the mistake
Recovery speedCopy already thereRestore job needed
ImmutabilityObject Lock on destinationVault Lock

Pick replication for availability, latency and compliance copies. Pick AWS Backup to recover from corruption, ransomware and accidental changes. Critical data often uses both.

Q44. For a 5 TB PostgreSQL database growing fast, Aurora PostgreSQL or RDS PostgreSQL? Senior
PointRDS PostgreSQLAurora PostgreSQL
Storage growthProvision and grow EBS (with autoscaling)Grows automatically up to a high limit
Read scalingReplicas each copy dataReaders share storage, faster to add
FailoverMulti-AZ instance or cluster deploymentFast failover to a reader
I/O costIncluded in storage type pricingPay per I/O or choose I/O-Optimized
Extensions and versionsWide supportMost common ones; check specific needs

Pick Aurora for large, busy, growing databases needing fast failover and many readers. Pick RDS for steady workloads where lower cost and full extension parity matter.

Q45. For a startup's first production stack, EC2, ECS on Fargate or Lambda? Senior
PointEC2ECS on FargateLambda
Time to first deployMediumMediumFast
Ongoing opsHighestLowLowest
Cost at low trafficPaying for idle serversOne or two small tasksNear zero
Cost at high steady trafficLowest with Savings PlansModerateCan become highest
Hiring and skillsCommonContainers widespreadServerless patterns

Pick Lambda (with API Gateway and DynamoDB or Aurora Serverless) for early, spiky products. Move busy, steady parts to Fargate or EC2 later when the cost curve says so.

Q46. Analytics on S3 data: Athena, Redshift Serverless or EMR? Senior
PointAthenaRedshift ServerlessEMR
ModelServerless SQL over S3Serverless data warehouseManaged Spark, Hive, Presto clusters (or serverless)
Best forAd-hoc queries, logsDashboards, many repeated BI queriesHeavy custom processing, ML pipelines
Data locationStays in S3Loaded or queried via SpectrumS3
CostPer data scannedPer compute usedPer instance or job resources

Pick Athena for occasional queries, Redshift for steady BI with many users, and EMR for complex transformations in code.

Q48. Lifting a Windows .NET Framework app to AWS: EC2, ECS with Windows containers or Elastic Beanstalk? Senior
PointEC2 (Windows)ECS Windows containersElastic Beanstalk (.NET on Windows)
Changes to appNoneContainerise (Windows images are large)Package as a deployment bundle
Ops workPatching, scaling yourselfCluster and image updatesPlatform managed
Density and speedOne app per server usuallySeveral apps per hostOne app per environment
Path to moderniseSlowGood step towards .NET on Linux laterLimited

Pick EC2 for the fastest move with least risk. Pick ECS Windows containers when many small apps should share hosts and you plan to modernise. Beanstalk fits a single app and a small team.

Q49. Storing IoT sensor readings: DynamoDB, a time-series database or S3 with Athena? Senior
PointDynamoDBTime-series database (Timestream for InfluxDB)S3 + Athena
Write patternVery high write rates with good key designBuilt for time-stamped writesBatched files (Firehose)
QueriesLatest values per deviceTime windows, downsampling, rollupsLarge historical analysis
Retention costHigher for years of data (TTL helps)MediumLowest

Common design: recent values in DynamoDB or a time-series database for dashboards, and all raw history in S3 for analytics. Check current availability of AWS time-series options, because Timestream for LiveAnalytics is no longer open to new customers.

Q50. CI build runners: EC2 Spot Auto Scaling group, CodeBuild or Fargate Spot? Senior
PointEC2 Spot ASG runnersCodeBuildFargate Spot tasks
Ops workHighest: AMIs, scaling, cleanupLowest: managed buildsLow
Docker buildsEasy (Docker on the host)Supported (privileged mode)Harder (no Docker daemon in Fargate)
CostLowest at high volumePay per build minuteLow, interruptions possible
InterruptionsSpot reclaims; retry jobsNoneSpot reclaims

Pick CodeBuild for most teams. Pick a Spot ASG (or managed runner fleets) for very high build volume where cost matters and you can handle interruptions. Fargate Spot fits lightweight, non-Docker jobs.

5. Frequently asked questions

How long should a comparison answer be in an interview?

About one minute: one line each on what they are, three or four differences, and when you would pick each, ideally with an example from your own work.

What if the interviewer asks about a pair that is not on this page?

Use the same frame: what problem each solves, how you manage it, how it scales, how you pay, and its limits. Then pick one for a concrete use case.

Are these comparisons asked for freshers too?

Yes. Freshers usually get EC2 vs Lambda, S3 vs EBS and RDS vs DynamoDB. Senior candidates get trade-offs such as Aurora Global Database vs cross-Region replicas.

6. Quick revision

  • Lambda: short, event-driven code. Fargate: containers without servers. EC2: full control.
  • S3: objects over HTTP. EBS: one instance's disk. EFS/FSx: shared file systems.
  • RDS: managed classic engines. Aurora: cloud-native storage, faster failover. DynamoDB: key-value at any scale.
  • Aurora: transactions. Redshift: analytics.

This page is one part of the complete AWS interview question set. Open the full list here: All 2052 AWS interview questions.