AWS Core Services and Architecture Questions
Amazon Web Services' core service catalog and how the pieces compose into a working system: EC2, Lambda, S3, VPC, IAM, RDS, and the managed-service ecosystem. Covers service selection within AWS, common reference architectures, the AWS Well-Architected Framework pillars, and operational patterns specific to the platform. For provider-agnostic compute or storage trade-offs, see the cross-cloud entries.
What are the five (now six, including Sustainability) pillars of the AWS Well-Architected Framework? For each, give one concrete AWS service or practice that demonstrates it in a real production system.
Sample Answer
Direct answer
The AWS Well-Architected Framework has six pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability (added in 2021, so a candidate who learned "the five pillars" before then should update that count). Each pillar is a different lens for evaluating an architecture's design decisions, and in practice they trade off against each other rather than all being maximized at once.
Structured elaboration
| Pillar | Focus | Example AWS service or practice |
|---|---|---|
| Operational Excellence | Run and improve systems and processes to deliver business value | A CI/CD pipeline (for example CodePipeline plus infrastructure as code) enabling repeatable, reversible deployments instead of manual changes |
| Security | Protect data, systems, and assets | Least-privilege IAM roles, encryption with AWS KMS, and CloudTrail for an immutable audit log |
| Reliability | Recover from failures and meet availability targets | Multi-AZ RDS with automated backups, and Route 53 (AWS's DNS service) health-check-based failover routing |
| Performance Efficiency | Use computing resources efficiently as demand changes | Auto Scaling matched to actual load, or a serverless compute choice (Lambda) where request patterns are spiky |
| Cost Optimization | Run workloads at the lowest cost that still meets requirements | Commitment discounts (Savings Plans or Reserved Instances) for steady-state load, and S3 lifecycle policies to move cold data to cheaper storage classes |
| Sustainability | Minimize the environmental impact of running workloads | Right-sizing so idle capacity isn't provisioned and run continuously, and shutting down non-production environments outside business hours |
Worked example
An alternate, practical framing worth knowing for an initial customer review: rather than trying to cover the entire framework's checklist in a first meeting, pick one concrete design decision per pillar and use it to anchor the conversation:
- Operational Excellence: "Do you deploy through a repeatable pipeline, or manually?"
- Security: "Are your IAM policies scoped per service, or does everything share one broad role?"
- Reliability: "Is your primary database Multi-AZ, or single-AZ?"
- Performance Efficiency: "Is compute autoscaled to load, or sized once at launch and left fixed?"
- Cost Optimization: "Are you using any commitment discounts, or is everything on-demand?"
- Sustainability: "Do non-production environments get shut down outside business hours, or run continuously?"
Each question is a single, concrete yes/no design decision rather than an abstract pillar description, which makes the framework tangible in a first conversation and gives the architect six specific follow-up threads to go deeper on afterward, rather than a full audit that wouldn't fit in one meeting.
Trade-offs and pitfalls
- Treating the pillars as independent, rather than in tension, is the most common mistake: maximizing Reliability (for example multi-region active-active) directly costs more, so Cost Optimization and Reliability pull in opposite directions, and the right balance depends on the workload's actual availability requirement, not on defaulting to the most reliable option everywhere.
- Naming only five pillars, or forgetting Sustainability specifically, is a common gap for anyone who learned the framework before it was added.
- Picking a token example per pillar without connecting it back to the actual workload's requirements turns the exercise into a checklist rather than a design discussion; the point of naming a concrete decision is to reveal a trade-off worth talking about, not just to demonstrate recall of the pillar names.
What is an Amazon VPC and what do its core components do: subnets, route tables, internet gateway, NAT gateway, security groups, network ACLs? For each, give a short example of when a misconfiguration there would break connectivity.
Sample Answer
A VPC is your isolated virtual network; everything else is about controlling where traffic in that network is allowed to go. Subnets carve the VPC's IP range into AZ-scoped segments, route tables decide the next hop for traffic leaving each subnet, an Internet Gateway and NAT Gateway broker internet reachability differently for public versus private subnets, and Security Groups plus Network ACLs are the two firewall layers. Most "why can't X reach Y" issues in a VPC trace back to exactly one of these six pieces.
The six components
| Component | Responsibility | Example misconfiguration that breaks connectivity |
|---|---|---|
| Subnets | Segment the VPC's CIDR into AZ-scoped ranges, public or private depending on their route table | An instance placed in a subnet whose route table has no path to the internet, even though the app assumes it can reach one |
| Route tables | Define the next hop for each destination CIDR; each subnet is associated with exactly one route table, defaulting to the VPC's main route table if none is explicitly attached | Forgetting to explicitly associate a new subnet, so it silently inherits the main route table instead of the intended public/private one |
| Internet Gateway (IGW) | Attaches to the VPC to allow public subnets to reach the internet | IGW is attached to the VPC, but the public subnet's route table still has no 0.0.0.0/0 -> IGW entry, so it behaves like a private subnet anyway |
| NAT Gateway | Lets private-subnet instances initiate outbound internet traffic while staying unreachable from the internet | Private subnet's route table has no 0.0.0.0/0 -> NAT route, so outbound package updates and API calls from private instances fail |
| Security Groups | Instance-level, stateful, allow-only firewall attached to each ENI (Elastic Network Interface) | Missing an inbound rule for the application's listening port, so nothing outside the SG can reach it even though routing is fine |
| Network ACLs | Subnet-level, stateless, ordered allow/deny firewall | An explicit deny rule with a low rule number silently blocks traffic that a later, higher-numbered allow rule was meant to permit |
Typical route table entries
A public subnet's route table normally has the automatically-added local route for the VPC's CIDR, plus 0.0.0.0/0 -> igw-xxxxxxxx. A private subnet's route table has the same local route, plus 0.0.0.0/0 -> nat-xxxxxxxx if it needs outbound internet access, or no default route at all if it should be fully isolated. Since a subnet uses exactly one route table at a time, the association itself, not just the rules inside it, is worth checking first when routing looks wrong.
Worked example: tracing a connectivity failure
A private-subnet EC2 instance can't reach an external API. Working through the components in order:
- Route table: the private subnet's table has
0.0.0.0/0 -> nat-0123abc, so outbound routing is present. - NAT Gateway: it exists, is in an "available" state, and sits in a public subnet with its own route to the IGW, so the NAT path itself is healthy.
- NACL on the private subnet: inbound allows the ephemeral port range from 0.0.0.0/0, but outbound only allows port 443, and the instance is calling the API on port 8443. That's the root cause: add an outbound NACL rule allowing 8443.
That order (routing target, then subnet-level filter, then instance-level filter, then the instance's own OS firewall if still stuck) is the standard troubleshooting sequence because each layer can only make traffic that already passed the previous layer succeed or fail.
Trade-offs and pitfalls
- The "main route table" behavior is a common surprise: a subnet that was never explicitly associated with a route table silently uses the VPC's main table, which teams sometimes forget to lock down.
- Because NACLs are stateless, adding an inbound rule without the matching outbound rule (or vice versa) for return traffic is the most common NACL bug.
- A single shared NAT Gateway across all AZs is cheaper than one per AZ, but it's also a single point of failure and a source of cross-AZ data transfer charges; that's a deliberate cost-versus-resilience trade-off, not an oversight.
- An IGW attached to the VPC doesn't make every subnet public by itself; the subnet's own route table still has to point at it.
Your API Gateway is returning 429 Too Many Requests during traffic spikes. Walk through how you'd diagnose whether the throttling is happening at API Gateway or at the backend, and the fixes available at each layer.
Sample Answer
Direct answer
Start by correlating timing: pull API Gateway's CloudWatch metrics (ThrottleCount, 4XXError, Count, IntegrationLatency) for the affected stage/method alongside the backend's own error and saturation metrics for the same window. If ThrottleCount rises while the backend's incoming request volume stays flat or drops, API Gateway is throttling before requests even reach the backend. If API Gateway's integration request count keeps climbing but the backend itself is returning its own 429s (or its logs show connection/thread-pool rejections), the backend is the bottleneck and API Gateway is just passing the failure through.
Structured elaboration
Where API Gateway throttling can be applied (and in what precedence order)
API Gateway evaluates throttling in this order, and the tightest applicable limit wins:
- Per-client (usage plan / API key) throttling for that stage
- Per-method throttling set on the stage
- Account-level, per-Region throttling (a default ceiling across all your APIs in that Region)
- AWS's own Regional throttling ceiling (fixed, not customer-configurable)
API Gateway enforces its limits with a token-bucket algorithm: the rate is how fast tokens refill (steady-state requests/sec), the burst is the bucket's capacity (how many requests can go through instantly before the steady rate takes over). A spike that's short but sharp can exhaust the burst allowance and start getting 429s even if the sustained rate is well within the configured limit.
Diagnosis checklist
- Check whether the traffic is using API keys tied to a usage plan; if so, check that plan's rate/burst settings, since a per-key limit can throttle one client's traffic pattern while the API as a whole has headroom.
- Check stage-level and method-level throttling overrides, since a specific high-traffic method (e.g., a search endpoint) may have a tighter override than the API's general limit.
- Trace a sample of 429 requests end-to-end (distributed tracing, if enabled) to see definitively whether the response originated at API Gateway or was proxied from the backend.
- If a Web Application Firewall (WAF) or Application Load Balancer (ALB) sits in front of API Gateway, check its rate-based rules too; a 429-shaped response can originate there instead of at API Gateway itself.
Worked example
Suppose CloudWatch shows ThrottleCount spiking to several hundred per minute during the traffic spike, while IntegrationLatency and the backend's own request-count metric stay essentially flat during the same window. That pattern says the requests never reached the backend: API Gateway rejected them at the edge because the spike's burst exceeded the configured token-bucket capacity, most likely the account-level or usage-plan burst limit rather than a per-method override (if this were a per-method override, only that one method's traffic would show elevated ThrottleCount while others stayed clean). The fix in this case is at the API Gateway layer: request an account-level limit increase if the API's aggregate legitimate traffic genuinely needs a higher regional ceiling, and/or raise the usage plan's burst allowance for the affected client so short, legitimate spikes don't get rejected before reaching the backend.
If instead ThrottleCount stayed low but the backend's own error logs show its connection pool or thread pool rejecting work and returning its own 429/503, the fix is downstream: autoscale the backend on a leading indicator (queue depth, concurrency, or request latency, not just CPU), and consider adding a buffering layer (a queue) in front of the backend so a burst is absorbed and drained at a steady rate instead of hitting the backend's fixed capacity directly.
Trade-offs and pitfalls
- Raising API Gateway's limits without also confirming the backend can absorb the resulting traffic just moves the 429s downstream, where they show up as backend errors instead, which is a worse failure mode to debug.
- Clients need to implement backoff (respecting the
Retry-Afterbehavior implied by 429s, with jitter) regardless of which layer is throttling; without it, a retry storm from many clients simultaneously retrying can turn a brief spike into a sustained overload. - Usage-plan quotas and rate/burst limits are, per AWS's own framing, "best-effort" targets, not hard guarantees; don't design a system that assumes a configured limit is a precise ceiling under all conditions.
- A capacity playbook (documented steps to raise usage-plan limits, request an account-level increase, and scale the backend) written before an incident saves real time during one; deciding these steps live during a spike is slower and more error-prone than following a rehearsed plan.
Compare EBS volumes and EC2 instance store for high-performance scratch storage. When is ephemeral instance-store NVMe preferable over provisioned gp3/io2 EBS volumes?
Sample Answer
EC2 instance store is physically attached Non-Volatile Memory express (NVMe) storage with the lowest possible latency and highest raw input/output operations per second (IOPS), but it is ephemeral: the data is gone the moment the instance stops, terminates, or the underlying hardware fails. Amazon Elastic Block Store (EBS), in the gp3 or io2 families, is network-attached, durable, persists independently of the instance lifecycle, and supports snapshots, but has to cross the network to reach the instance, which adds latency EBS cannot fully eliminate no matter how much performance is provisioned. Reach for instance store when the data is disposable and the workload needs raw local speed; reach for EBS when the data has to survive the instance.
Why the trade-off exists
- Instance store lives on the physical host, so there is no network hop between the instance and the disk; that is the entire source of its latency and IOPS advantage. The cost of that physical attachment is that the data cannot follow the instance if it stops, is replaced, or the host fails, and it is not covered by EBS snapshots.
- EBS is a separate, replicated storage service the instance attaches to over the network. That network hop is why EBS latency, even on the fastest provisioned-IOPS tiers, will not match local NVMe, but it is also why EBS data survives a stop and restart, supports point-in-time snapshots, and can be detached and reattached to a different instance.
When ephemeral instance-store NVMe is the right call
- Pure scratch space: a shuffle buffer, a temporary cache, or intermediate build or processing files that are cheap to regenerate if lost.
- The absolute lowest latency and highest throughput matters more than persistence, such as staging data locally right before a compute-heavy job processes it.
- Cost-sensitive, high-throughput workloads, where paying for durable, replicated EBS capacity for data you are going to discard anyway is wasted spend.
- Not every instance type includes instance store; it depends on the specific instance family, so this is a constraint to check before designing around it, not an option available everywhere.
When to prefer gp3 or io2 EBS instead
- Anything that has to survive a stop, restart, or instance replacement: databases, application state, or any artifact you cannot afford to regenerate.
- Anything that needs a snapshot for backup, disaster recovery, or cloning to another instance or AWS Region.
- Predictable, provisioned performance with a durability guarantee: gp3 for general steady performance, io2 when the workload needs the highest sustained IOPS with the strongest durability target.
Worked example
A batch analytics job on EC2 shuffles several hundred gigabytes of intermediate data during processing, then writes only the final aggregated result. The intermediate shuffle data goes on instance-store NVMe attached to the instance, since it needs the fastest possible local I/O and is fully disposable if the instance is replaced mid-job, the job would simply restart from its last checkpoint. The final aggregated result, and any checkpoint needed to resume the job, is written to a gp3 EBS volume (or Amazon S3) specifically because that data has to survive even if the instance disappears. Using EBS for the disposable shuffle data would add unnecessary network latency and cost for no durability benefit; using instance store for the final result would risk losing it on any instance interruption, including a Spot Instance reclaim.
Trade-offs and pitfalls
- The most common mistake is treating instance store as free durable storage because it is fast; it has no snapshot mechanism and no protection against instance interruption, which matters more on Spot Instances, where interruption is expected, not exceptional.
- Not every instance family offers instance store, and the ones that do vary in how much local storage they provide, so this decision is partly constrained by which instance types are already in use, not purely a preference.
- Striping multiple instance-store devices together increases throughput but also increases the blast radius of a single device or host failure; know that trade-off before applying it to anything that is not fully disposable.
- A hybrid pattern, using instance store for scratch and periodically checkpointing the durable result to EBS or S3, gets most of the speed benefit without the durability risk, and is the common real-world answer rather than picking one exclusively.
You need to give an external partner temporary, auditable download access to private S3 objects. Compare pre-signed S3 URLs, CloudFront signed URLs/cookies, and STS/OIDC-based cross-account access, and say which you'd pick when you need fine-grained revocation and a long-lived audit trail.
Sample Answer
Direct answer
For fine-grained revocation and a long-lived, identity-linked audit trail, I'd give the partner their own identity and short-lived credentials rather than a shareable link: specifically, AWS Security Token Service (STS) issuing temporary credentials through OpenID Connect (OIDC) federation or a cross-account role, an approach I'll call STS/OIDC-based cross-account access. The partner authenticates through their own identity provider or assumes an AWS Identity and Access Management (IAM) role, gets short-lived credentials scoped by an IAM policy, and every subsequent S3 call shows up in CloudTrail tied to that specific principal. Access can be revoked by changing the trust policy or the identity-provider side, and audited by principal rather than by URL.
Structured elaboration
| Approach | Revocation | Audit trail | Identity binding | Best fit |
|---|---|---|---|---|
| Pre-signed S3 URL | No revoke API before expiry; only full key rotation or a bucket policy change stops it | CloudTrail and S3 access logs show the GET, but not who used the URL, since anyone holding it can use it | None; a valid URL is itself a bearer credential | Quick, low-stakes, short-TTL one-off downloads |
| CloudFront signed URL/cookie | Better: rotate the signing key pair or shorten TTL; not instant unless paired with edge logic checking a revocation list | CloudFront plus Origin Access Control (OAC) logs and CloudTrail give a fuller picture, plus IP/geo/WAF restriction | Weak, tied to a signing key rather than a partner identity, unless an auth layer issuing the URLs adds one | External distribution at scale needing rate-limiting or geofencing |
| STS/OIDC cross-account | Strong: change the IAM trust policy, revoke at the partner's identity provider, or shorten session duration | Excellent: CloudTrail records the assume-role call and every subsequent call under that principal's identity | Strong; access is bound to the partner's actual identity | Fine-grained revocation plus a real, long-lived audit trail |
- Pre-signed URLs need no infrastructure beyond an IAM-permitted caller generating one, but the URL itself is the credential: once issued, it's valid until expiry no matter what happens afterward, and logs can't reliably tell you which person or system actually used it.
- CloudFront signed URLs and cookies add a Content Delivery Network (CDN) layer with HTTPS termination, AWS Web Application Firewall (WAF) integration, and, paired with Origin Access Control (the current recommended mechanism, replacing the older Origin Access Identity), a clean way to keep the S3 bucket fully private while the CDN handles authorization. Revocation is still key-rotation-based rather than instant per grant.
- STS/OIDC access issues short-lived, scoped credentials tied to a real principal. It requires the partner to be able to federate, either through their own identity provider or by assuming a cross-account role, which is more setup than a URL, but it's the only option here where "revoke this specific partner's access" and "show everything this partner did, for as long as logs are retained" are both native rather than bolted on.
Worked example
A partner needs 90 days of recurring access to a nightly export bucket, and the contract requires proving, for any given day, exactly what the partner downloaded. Issuing a fresh pre-signed URL per file each day would work operationally, but the resulting logs are keyed on IP and request metadata, not partner identity, so proving "the partner accessed exactly these files" is weak evidence. Setting up an IAM role that the partner's own AWS account assumes via sts:AssumeRole, or an OIDC identity-provider trust relationship if they don't have their own AWS account, with a policy scoped to read access on that one prefix, produces CloudTrail records showing the assume-role call followed by object-read calls, all attributable to the partner's session. Access can be cut off instantly by removing the trust relationship, rather than waiting out a URL's TTL or rotating a signing key that might be shared with other consumers.
Trade-offs & pitfalls
- Defaulting to pre-signed URLs because they're fastest to implement becomes a problem exactly when someone later asks "can we prove what they accessed" or "can we cut them off right now," neither of which pre-signed URLs answer well.
- STS/OIDC access requires the partner to be capable of federating; a small external party with no real identity infrastructure may not be able to use this option at all, a genuine constraint rather than just extra setup work.
- CloudFront signed URLs are a reasonable middle ground when the partner can't federate but stronger control than a bare pre-signed URL is still needed, especially at higher request volume where the CDN's caching and edge logic also matter.
- None of these approaches replace basic operational hygiene: HTTPS enforcement, short TTLs where they apply, key rotation, and shipping logs to storage the partner can't reach, regardless of which mechanism is chosen.
Unlock Full Question Bank
Get access to all AWS Core Services and Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.