How to Answer in an Interview
- Start with a one-line definition, then when to use it, then a trade-off or example
- Say why you chose a service, not only its name
- Ask about requirements (users, availability, budget, data size) before designing
Fundamentals
Q1. What is the difference between a Region, an Availability Zone and an edge location?
A Region is a geographic area with several isolated Availability Zones (AZs). An AZ is one or more data centers with independent power and networking. Edge locations are CDN and DNS points of presence used by CloudFront and Route 53 close to users. Use multiple AZs for high availability and multiple Regions for disaster recovery or global users.
Q2. Explain the shared responsibility model.
AWS is responsible for security of the cloud (hardware, facilities, hypervisor, managed service infrastructure). The customer is responsible for security in the cloud: data, IAM, OS patching on EC2, network rules and encryption choices. For managed services such as RDS, AWS patches the engine but you still manage access, parameters and data.
Q3. What are the six pillars of the Well-Architected Framework?
Operational excellence, security, reliability, performance efficiency, cost optimization and sustainability. In interviews connect your design to pillars, for example Multi-AZ for reliability and Savings Plans for cost.
Q4. How is AWS different from a traditional data center?
You pay as you go instead of buying hardware, provision in minutes, scale up and down, use managed services, and get global reach. The trade-off is that you must design for failure, control spend, and understand the shared responsibility model.
Identity and Security
Q1. What is the difference between an IAM user, group, role and policy?
A user is a person or application identity with long-term credentials. A group collects users to attach permissions. A role is assumed temporarily and gives short-term credentials, used by EC2, Lambda and cross-account access. A policy is a JSON document that allows or denies actions on resources. Prefer roles and Identity Center over long-lived access keys.
Q2. How does IAM policy evaluation work?
By default everything is denied. An explicit deny always wins, then SCPs, permission boundaries and session policies must also allow, and finally an allow in an identity or resource policy grants access. For cross-account access both sides must allow.
Q3. How do you give an EC2 instance access to S3 securely?
Attach an IAM role through an instance profile with a least-privilege policy for that bucket. The SDK gets temporary credentials from instance metadata (require IMDSv2). Never store access keys on the instance.
Q4. What is the difference between a security group and a network ACL?
A security group is stateful, attached to a network interface or instance, supports allow rules only and can reference other security groups. A NACL is stateless, applies at the subnet level, supports allow and deny rules in numbered order and needs rules for both directions. Use security groups as the main control and NACLs for subnet-wide blocks.
Q5. How do you encrypt data on AWS?
Encrypt in transit with TLS (ACM certificates) and at rest with KMS. S3, EBS, RDS and DynamoDB support encryption with AWS managed or customer managed keys. Use envelope encryption for large data, key policies and rotation, and Secrets Manager for credentials.
Q6. What is the difference between KMS and CloudHSM?
KMS is a managed key service integrated with most AWS services. CloudHSM gives you dedicated hardware security modules under your control, used when regulations demand single-tenant HSMs or custom key stores.
Q7. How do you secure the root account?
Enable MFA, remove access keys, use a strong unique password with a shared mailbox, use it only for tasks that require root, and alert on any root login. Use SCPs in organizations to limit it in member accounts.
Compute and Scaling
Q1. Explain EC2 purchasing options.
On-Demand is flexible and priced per second. Savings Plans and Reserved Instances give discounts for a one or three year commitment for steady use. Spot uses spare capacity at large discounts but can be interrupted, good for fault-tolerant jobs. Dedicated Hosts and Instances provide physical isolation or licensing control. Capacity Reservations guarantee capacity in an AZ.
Q2. What is an Auto Scaling group and how does it scale?
An ASG keeps a number of EC2 instances across AZs between a minimum and a maximum, replaces unhealthy instances and scales by target tracking (for example 50 percent CPU), step or scheduled policies. Use ELB health checks so unhealthy application instances are replaced.
Q3. ALB vs NLB vs GLB: when do you use each?
ALB works at layer 7 with host and path routing, HTTP/2, WebSockets and Lambda targets. NLB works at layer 4 with very high throughput, low latency, static IPs and TLS passthrough. Gateway Load Balancer inserts third-party virtual appliances such as firewalls.
Q4. When would you choose Lambda over EC2 or containers?
Choose Lambda for event-driven, short tasks (up to 15 minutes), spiky or unpredictable load and low operations effort. Choose containers or EC2 for long-running processes, special runtimes, steady heavy load or when you need full control. Watch cold starts, concurrency and per-invocation cost at very high volume.
Q5. ECS vs EKS vs Fargate?
ECS is the AWS-native container orchestrator. EKS is managed Kubernetes for teams that want the Kubernetes ecosystem and portability. Fargate is the serverless compute option for both, so you do not manage nodes.
Storage
Q1. Name the S3 storage classes and when to use them.
Standard for frequent access, Intelligent-Tiering for unknown patterns, Standard-IA and One Zone-IA for infrequent access, Glacier Instant Retrieval, Flexible Retrieval and Deep Archive for archives with different retrieval times. Use lifecycle rules to move data automatically.
Q2. How do you secure an S3 bucket?
Turn on Block Public Access, use bucket policies and IAM with least privilege, enable default encryption, versioning, MFA delete or Object Lock when needed, access logging and CloudTrail data events, and use VPC endpoints or presigned URLs for controlled access.
Q3. EBS vs EFS vs S3 vs instance store?
EBS is block storage for one EC2 instance in one AZ (snapshots to S3). EFS is shared NFS file storage across many instances and AZs. S3 is object storage with huge scale and durability. Instance store is temporary, very fast local disk lost when the instance stops or fails.
Q4. What is S3 durability and availability?
S3 Standard is designed for 99.999999999 percent (11 nines) durability by storing data redundantly across multiple AZs. Availability targets differ by class, and the exact numbers are published on the AWS site.
Networking
Q1. How do you design a VPC?
Pick a CIDR with room to grow that does not overlap with on-premises or other VPCs. Use public subnets for load balancers and NAT gateways, private subnets for applications and a data tier for databases, across at least two AZs. Add route tables, Internet and NAT gateways, VPC endpoints and flow logs.
Q2. What is the difference between an internet gateway and a NAT gateway?
An internet gateway allows two-way internet access for resources with public IPs in public subnets. A NAT gateway lets resources in private subnets start outbound connections without allowing inbound connections from the internet. Use one NAT gateway per AZ for resilience.
Q3. What are VPC endpoints?
They let you reach AWS services privately. Gateway endpoints (S3 and DynamoDB) are route table entries and free. Interface endpoints (PrivateLink) create ENIs with private IPs for many services and your own services, and cost per hour and per GB.
Q4. VPC peering vs Transit Gateway?
Peering is a one-to-one, non-transitive connection that is simple and cheap for a few VPCs. Transit Gateway is a regional hub that connects many VPCs and on-premises networks with route tables and transitive routing, but has its own cost.
Q5. Direct Connect vs Site-to-Site VPN?
VPN uses encrypted tunnels over the internet, is quick to set up and cheaper, but has variable latency. Direct Connect is a dedicated private link with consistent performance and higher bandwidth but takes longer to provision. Many companies use Direct Connect with VPN as backup.
Q6. Explain Route 53 routing policies.
Simple, weighted, latency, failover, geolocation, geoproximity, multivalue answer, and IP-based routing. Use weighted for canary releases, latency for the best performance, and failover with health checks for disaster recovery.
Q7. What does CloudFront do and how is it different from Global Accelerator?
CloudFront is a CDN that caches content at edge locations to reduce latency and origin load. Global Accelerator gives static anycast IPs and routes TCP/UDP traffic over the AWS backbone to the best healthy endpoint, with fast failover. It does not cache.
Databases
Q1. RDS vs Aurora vs DynamoDB?
RDS runs managed relational engines. Aurora is a cloud-built MySQL/PostgreSQL compatible engine with faster storage replication, up to 15 replicas and Global Database. DynamoDB is a serverless key-value and document store with single-digit millisecond latency at any scale. Choose by data model, query patterns and scale.
Q2. What is the difference between Multi-AZ and read replicas?
Multi-AZ keeps a synchronous standby for high availability and automatic failover, not for reads (except the Multi-AZ cluster option). Read replicas use asynchronous replication to scale reads and can be cross-Region. Replicas can be promoted for DR.
Q3. How do you choose a DynamoDB partition key?
Pick a key with high cardinality and even access so no partition becomes hot. Design tables from access patterns, use sort keys for ranges, GSIs for alternate queries, and DAX for microsecond read caching.
Practice
- Say the answers aloud in under one minute each
- Draw a VPC and explain where each component sits
- Prepare one real example where you applied each pillar
- Practise the follow-up question for each answer: what if the AZ fails, what if the load grows 10 times, what if the budget is cut by half
Conclusion
In interviews define the service, say when to use it and name the trade-off. Know IAM evaluation, security groups vs NACLs, ALB vs NLB, S3 classes, VPC design, connectivity options and the database choices well.

