Aws Interview Questions: 24 Real-World Q&A from Production Manifests
Bite-sized, standalone interview questions and answers for Aws. Read 5-10 per sitting. Each answer is 2-4 sentences max and stands on its own.
24 questions shown. Filter by keyword or difficulty below.
Topic: AWS Fundamentals & Global Infrastructure (Order 1)
Q: How does the AWS shared responsibility model differ for EC2 vs Lambda? [Intermediate]
With EC2, the customer is responsible for the guest OS, application, security patches, and network configuration up to the hypervisor layer — AWS secures the physical host, network fabric, and hypervisor. With Lambda, AWS manages everything from the runtime environment down, including OS patches, execution environment isolation, and scaling infrastructure — the customer only secures the function code, IAM permissions, and any VPC configuration. The difference is the depth of the security boundary: EC2 gives the customer host-level control with host-level responsibility; Lambda abstracts the host entirely.
Q: What is the difference between a region and an availability zone in terms of failure isolation? [Beginner]
A region is a fully independent geographic area composed of multiple, isolated AZs connected by low-latency redundant fiber — regions are isolated from each other for catastrophic failure. An AZ is a single data center or cluster of data centers within a region with independent power, cooling, and physical security; AZs are separated by meaningful distance (typically a few km) to prevent correlated failures while keeping inter-AZ latency under 2 ms. Two AZs in the same region share a control plane but fail independently.
Topic: AWS Networking — VPC, Subnets, Security Groups, NAT Gateways, VPC Peering (Order 2)
Q: How does a NAT Gateway differ from a NAT Instance for outbound-only traffic? [Intermediate]
A NAT Gateway is a managed AWS service that uses Elastic IPs and scales automatically up to 45 Gbps — it requires no instance management, no patching, and no route table manipulation beyond adding a default route to the gateway ID. A NAT Instance is an EC2 AMI running in a public subnet with Source/Destination Check disabled, requiring manual instance management, patching, and failover. NAT Gateway is highly available within an AZ by design; NAT Instance requires an Auto Scaling group across AZs with a health-check script.
Q: What happens to Security Group stateful filtering when traffic enters through a Network ACL? [Intermediate]
Security Groups are stateful — if inbound traffic is allowed, the return traffic is automatically permitted regardless of outbound rules. Network ACLs are stateless — they evaluate every inbound and outbound packet independently against their rule list. When both are applied to the same traffic flow, the SG’s stateful tracking handles connection state while the NACL’s stateless rules must explicitly allow both directions; a missing outbound NACL allow rule will drop return traffic that the SG already considers valid.
Topic: AWS Compute — EC2 Instance Types, Placement Groups, EC2 vs ECS vs Lambda (Order 3)
Q: What is the placement group strategy that minimizes correlated hardware failures? [Beginner]
Spread placement groups distribute instances across distinct physical racks, each with its own power and network — max 7 instances per AZ per group, guaranteeing no two instances share the same rack. This eliminates correlated failures from rack-level events (power loss, network switch failure), unlike Cluster placement groups which co-locate instances on the same rack for low-latency but create a single point of failure.
Q: How does AWS Lambda's execution environment lifecycle turn an invocation? [Intermediate]
Lambda maintains a warm pool of Sandbox environments. On invocation, the runtime reuses a warm sandbox if available (the /init phase is skipped), applying the function handler directly to the event. If no warm sandbox exists, the control plane creates a new microVM, copies the deployment package, bootstraps the runtime, and runs the handler’s initialization code — this cold start adds 200+ ms of latency before the handler executes.
Topic: AWS Storage — S3 Consistency Model, EBS Volume Types, EFS Lifecycle (Order 4)
Q: What is S3's consistency model for PUTS of new objects vs overwrite PUTS? [Beginner]
All S3 PUTS of new objects are strongly consistent — after a 200 response, a subsequent GET immediately returns the object. Overwrite PUTS of existing objects are also strongly consistent as of December 2020 — previously they were eventually consistent with a propagation window. DELETE operations are also strongly consistent: after a successful deletion, a subsequent GET returns 404.
Q: How does EBS gp3 differ from io2 Block Express at the volume level? [Intermediate]
gp3 provides baseline 3,000 IOPS and 125 MiB/s throughput for any volume size, with burst capability via earned IO credits — performance is independent of volume size up to 16 TiB maximum. io2 Block Express delivers up to 256,000 IOPS and 4,000 MiB/s throughput with 99.999% durability, using a Nitro-based SSD controller that enables sub-millisecond latency regardless of queue depth — designed for the largest SAP HANA, Oracle, and SQL Server workloads.
Topic: AWS Identity — IAM Policy Evaluation Logic, Explicit Deny, SCPs (Order 5)
Q: How does IAM's explicit deny override all other policy evaluations? [Intermediate]
IAM evaluates all applicable policies (identity-based, resource-based, permissions boundaries, SCPs) in a unified decision pass. If any policy contains an explicit "Effect": "Deny" that matches the action and resource, the evaluation short-circuits to deny regardless of any "Effect": "Allow" in other policies — there is no order-of-precedence tiebreaker. This is the only outcome that cannot be overridden.
Q: How do Service Control Policies (SCPs) differ from IAM permissions boundaries? [Intermediate]
SCPs are applied at the organization, OU, or account level in AWS Organizations and define the maximum permissions for all IAM entities within that scope — they cannot grant permissions, only restrict them, and do not affect service-linked roles or the management account. Permissions boundaries are set on individual IAM roles or users, limiting the maximum permissions that identity-based policies can grant — they are narrower in scope (single principal vs entire account) and can be combined with SCPs for defense-in-depth.
Topic: AWS Security — KMS Key Hierarchy, Secrets Manager Rotation, WAF Rule Groups (Order 6)
Q: How does the KMS key hierarchy protect envelope encryption? [Intermediate]
A customer master key (CMK) in KMS never leaves the HSM — it encrypts data keys locally within the HSM boundary. Each piece of customer data is encrypted with a unique data key (DEK), which is itself encrypted by the CMK (creating a wrapped DEK). The wrapped DEK is stored alongside the ciphertext; on decryption, KMS unwraps it inside the HSM and returns only the plaintext data key to the caller for local use. Compromising the storage does not expose the data without access to the CMK.
Q: How does Secrets Manager rotate a secret without application downtime? [Intermediate]
Secrets Manager creates a new version of the secret with a staging label (AWSCURRENT) and immediately marks the previous version as AWSPREVIOUS. For rotation with a Lambda function, Secrets Manager invokes the rotation function which creates a new credential in the database, tests it, and then updates the secret in Secrets Manager — the AWSCURRENT label atomically switches to the new version. Applications reading the secret via the SDK automatically get the current value without any code change or restart.
Topic: AWS EKS — Cluster Provisioning, Node Groups, IRSA, VPC CNI (Order 7)
Q: How does the VPC CNI assign IP addresses to pods without overlay networking? [Intermediate]
The VPC CNI plugin (aws-node) creates a warm pool of Elastic Network Interface (ENI) secondary IPs in each node’s subnet. When a pod is scheduled, the CNI allocates a secondary IP from the warm pool directly to the pod’s network namespace — the pod receives a real VPC IP address with no NAT or encapsulation. Each ENI supports a limited number of secondary IPs based on instance type, which caps pod density per node unless a custom networking overlay (e.g., Calico, Cilium) is used.
Q: How does IAM Roles for Service Accounts (IRSA) authenticate to AWS APIs? [Intermediate]
IRSA associates an IAM role with a Kubernetes Service Account via an annotation (eks.amazonaws.com/role-arn). The pod’s service account token is an OIDC token signed by the EKS cluster’s OIDC issuer URL. When the pod calls the AWS SDK, the SDK exchanges this OIDC token for an AWS STS credential via AssumeRoleWithWebIdentity, returning temporary credentials scoped to the associated IAM role — no long-lived AWS credentials ever touch the pod.
Topic: AWS DevOps — CodePipeline Artifacts, CodeBuild Cache, CloudFormation Drift (Order 8)
Q: How does CodePipeline pass artifacts between stages? [Intermediate]
Each action in a pipeline can specify outputArtifacts that CodePipeline stores in a pipeline-specific S3 bucket. The next stage’s action references these artifacts as inputArtifacts; CodePipeline downloads them from S3 into the action runner’s working directory before execution. Artifacts are versioned per pipeline execution, enabling rollback by replaying a specific execution’s artifact set.
Q: How does CloudFormation detect drift from the template? [Intermediate]
CloudFormation’s drift detection calls each resource provider’s Describe* API and compares the returned property values against the template’s desired configuration. Resources that support drift detection have a DriftStatus of MODIFIED, DELETED, or NOT_CHECKED. The comparison is done at the resource property level — a change made outside CloudFormation (via the Console, CLI, or API) is flagged as drift even if it doesn’t impact resource operation.
Topic: AWS Monitoring — CloudWatch Metrics vs Logs, X-Ray Trace Segments, Alarms (Order 9)
Q: What is the difference between CloudWatch Metrics and CloudWatch Logs in terms of querying? [Beginner]
CloudWatch Metrics are time-series data points indexed by dimensions — they support real-time dashboards, anomaly detection, and alarm evaluation with 1-second granularity via high-resolution metrics, but cannot be searched by arbitrary text. CloudWatch Logs store raw text log events with a timestamp, supporting Logs Insights queries using a SQL-like syntax (fields @timestamp, @message | filter @message like /ERROR/ | stats count() by bin(5m)) — but cannot drive alarms faster than 60-second evaluation periods.
Q: How do X-Ray trace segments and subsegments model a distributed request? [Intermediate]
A segment represents the journey of a request through one service (e.g., an API Gateway call) — it records the host, request, response, and any errors. Subsegments break down work within that service (e.g., a DynamoDB query inside the Lambda handler), each with its own timing, metadata, and child subsegments. The trace ID is propagated across service boundaries via the X-Amzn-Trace-Id header; the complete trace reconstructs the end-to-end call graph with per-hop latency.
Topic: AWS Serverless — Lambda Layers, Step Functions, API Gateway Caching (Order 10)
Q: How do Lambda layers share code across functions? [Intermediate]
A layer is a ZIP archive containing libraries, custom runtimes, or configuration files that Lambda extracts into /opt in the execution environment before running the handler. The function’s code can import from /opt/nodejs/node_modules/, /opt/python/lib/, etc. Layers are versioned and can be added to up to five functions simultaneously — common dependencies are updated in one place without rebuilding individual function deployment packages.
Q: How does API Gateway response caching reduce backend load? [Intermediate]
API Gateway caches responses from backend integrations based on the endpoint’s cache key (composed from the request parameters, headers, and stage). When a request’s cache key matches a cached entry within the TTL, API Gateway returns the cached response without invoking the backend integration — the backend sees zero additional requests. Cache capacity is provisioned in GB (0.5 to 237 GB per stage) and is managed as a dedicated in-memory cluster.
Topic: AWS Database — DynamoDB Partitioning, Throttling, DAX; RDS Multi-AZ; Aurora (Order 11)
Q: How does DynamoDB partition data and what triggers throttling? [Intermediate]
DynamoDB partitions data by hash of the partition key — each partition can hold up to 10 GB and support 3,000 RCU or 1,000 WCU. When a partition exceeds these limits or total table throughput grows, DynamoDB splits partitions automatically. Throttling (ProvisionedThroughputExceededException) occurs when a single partition’s read/write activity exceeds its allocated capacity — this typically happens with a hot key whose traffic overwhelms one partition while others remain underutilized.
Q: How does RDS Multi-AZ failover work without connection string changes? [Intermediate]
RDS creates a synchronous standby replica in a different AZ with the same DNS name (*.rds.amazonaws.com). On failure detection (loss of physical heartbeat, storage failure, or AZ outage), RDS promotes the standby to primary and updates the DNS CNAME to point at the new primary’s endpoint — the DNS TTL is set to 30 seconds by default. Clients using the original DNS name reconnect to the new primary without any application configuration change.
Topic: AWS Messaging — SQS FIFO vs Standard, SNS Filtering, Kinesis Shards (Order 12)
Q: How does SQS FIFO guarantee exactly-once processing? [Intermediate]
FIFO queues use a content-based deduplication ID (or a caller-supplied MessageDeduplicationId) combined with a 5-minute deduplication window — any message with the same deduplication ID within that window is silently dropped. The consumer must also use a receive request with a ReceiveRequestAttemptId to ensure retries don’t produce duplicates. This eliminates the at-least-once behavior of standard queues where a consumer timeout or failure causes message reappearance.
Q: How do Kinesis shards determine throughput? [Intermediate]
Each shard provides 1 MB/s write and 2 MB/s read (or 1,000 records/s write and 5 reads/s per shard, whichever is hit first). Data records within a shard are ordered by sequence number — all records with the same partition key go to the same shard. Total stream throughput scales linearly with shard count: a 10-shard stream supports 10 MB/s writes and 20 MB/s reads. Shards are the only scaling mechanism and must be split or merged via UpdateShardCount.
| Last updated: July 2026 | Total Q&A: 24 across Aws |