Technology

AWS Interview Questions and Answers

AWS is the most widely used cloud platform, and AWS skills are asked in DevOps, backend, data and cloud engineer interviews. These AWS interview questions cover core services such as EC2, S3, IAM and VPC for freshers, then high availability, serverless, databases, security, cost optimisation and architecture design for experienced engineers.

30 questions · Updated

Reading answers is not the same as saying them.Practise AWS questions out loud and get a score, what you missed and a model answer for each one.
Practise free with AI
AWS Interview Questions with answers. Examples: What are regions and availability zones? What is the difference between EC2, Lambda and ECS? What is S3, and what are its storage classes? What is IAM, and what is the difference between users, groups, roles and policies?
AWS Interview Questions: 30 questions with model answers on this page.

Basic AWS interview questions

Fundamentals, definitions and simple scenarios. Good for freshers and warm-ups.

1. What are regions and availability zones?

Answer flow · 3 steps
  1. A region is a geographic area, such as Mumbai (ap-south-1), with multiple isolated availability zones.

  2. Each availability zone is one or more data centres with separate power and networking, connected to the others with low latency.

  3. Spreading resources across availability zones protects an application from a single data centre failure.

2. What is the difference between EC2, Lambda and ECS?

Answer flow · 4 steps
  1. EC2 provides virtual servers that you manage, including the operating system.

  2. Lambda runs code in response to events without managing servers, billed per request and duration, and suits short, event-driven tasks.

  3. ECS runs Docker containers, either on EC2 instances or serverless with Fargate.

  4. EKS is the managed Kubernetes option.

3. What is S3, and what are its storage classes?

Answer flow · 3 steps
  1. S3 is object storage for files of any size, with very high durability.

  2. Storage classes include S3 Standard for frequently accessed data, Intelligent-Tiering which moves data automatically based on access, Standard-IA and One Zone-IA for infrequent access, and Glacier Instant Retrieval, Flexible Retrieval and Deep Archive for archives.

  3. Lifecycle rules move objects between classes automatically.

4. What EC2 pricing options are there?

Answer flow · 4 steps
  1. On-Demand: pay per second with no commitment, flexible but most expensive.

  2. Savings Plans and Reserved Instances: commit to one or three years of usage for discounts of up to about 70%.

  3. Spot Instances: use spare capacity at up to 90% off, but AWS can reclaim them with two minutes' notice, which suits fault-tolerant batch jobs.

  4. Dedicated Hosts serve licensing and compliance needs.

5. What is the difference between EBS, EFS and S3?

Answer flow · 3 steps
  1. EBS provides block storage volumes attached to one EC2 instance in one availability zone, like a hard disk, for operating systems and databases.

  2. EFS is a managed network file system that many instances can mount at once across zones.

  3. S3 is object storage accessed over HTTP, virtually unlimited and very durable, for files, backups, static websites and data lakes.

6. What is an AMI?

An Amazon Machine Image is a template for launching EC2 instances, containing the operating system, configuration and installed software. You can use AWS or marketplace AMIs or create your own from a configured instance, often with tools such as Packer, so new instances in an Auto Scaling group start identical and quickly.

7. What is an Elastic IP?

Answer flow · 3 steps
  1. An Elastic IP is a static public IPv4 address that you allocate to your account and attach to an instance or network interface, so the address stays the same when the instance is stopped or replaced.

  2. AWS charges for all public IPv4 addresses.

  3. Most architectures use load balancers and DNS names instead of fixed IPs.

8. What is CloudWatch used for?

CloudWatch collects metrics from AWS services and applications, stores and searches logs (CloudWatch Logs and Logs Insights), creates dashboards, and triggers alarms that notify teams through SNS or take automatic actions such as scaling. It also offers synthetic monitoring, application insights and tracing through X-Ray integration.

9. What is Route 53?

Route 53 is AWS's DNS service and domain registrar. It routes users to resources with routing policies such as simple, weighted (for gradual traffic shifts), latency-based, geolocation and failover with health checks, and supports alias records that point a domain's root to load balancers, CloudFront or S3 at no query cost.

10. What is CloudFront?

Answer flow · 3 steps
  1. CloudFront is AWS's content delivery network.

  2. It caches content at edge locations around the world, including India, so users get static files, images, videos and even API responses faster.

  3. It provides HTTPS, protection with AWS WAF and Shield, origin access control so S3 buckets stay private, and edge functions for small customisations.

11. What is the shared responsibility model?

Answer flow · 3 steps
  1. AWS is responsible for security of the cloud: physical data centres, hardware, networking and the virtualisation layer.

  2. Customers are responsible for security in the cloud: their data, IAM users and permissions, operating system patches on EC2, network configuration such as security groups, encryption choices and application security.

  3. Managed services shift more responsibility to AWS.

Intermediate AWS interview questions

Applied problems, trade-offs and questions about your own projects.

12. What is IAM, and what is the difference between users, groups, roles and policies?

Answer flow · 4 steps
  1. IAM controls who can do what in AWS.

  2. Users represent people or applications with long-term credentials, groups collect users to share permissions, and roles provide temporary credentials that services, such as an EC2 instance or Lambda function, or users can assume.

  3. Policies are JSON documents that allow or deny actions on resources.

  4. Best practice is least privilege and roles instead of access keys.

13. What is a VPC, and what is the difference between public and private subnets?

Answer flow · 3 steps
  1. A Virtual Private Cloud is an isolated network in AWS with its own IP range, subnets, route tables and gateways.

  2. A public subnet has a route to an internet gateway, which suits load balancers.

  3. A private subnet has no direct internet route, which suits application servers and databases; they reach the internet for updates through a NAT gateway.

14. What is the difference between security groups and network ACLs?

Security groups are stateful firewalls attached to resources such as EC2 instances: they only have allow rules, and return traffic is allowed automatically. Network ACLs are stateless firewalls at the subnet level, with numbered allow and deny rules evaluated in order, and return traffic must be allowed explicitly.

15. What is the difference between RDS, Aurora and DynamoDB?

Answer flow · 3 steps
  1. RDS is a managed relational database service for MySQL, PostgreSQL, SQL Server, Oracle and MariaDB, handling backups, patching and Multi-AZ failover.

  2. Aurora is AWS's own MySQL- and PostgreSQL-compatible database with higher performance, storage that grows automatically and fast replicas.

  3. DynamoDB is a serverless NoSQL key-value database with single-digit millisecond latency at any scale.

16. What is the difference between an ALB and an NLB?

An Application Load Balancer works at layer 7 (HTTP and HTTPS): it routes by path, host name or headers, supports WebSockets, authentication and AWS WAF, and suits web applications and microservices. A Network Load Balancer works at layer 4 (TCP, UDP and TLS), handles millions of requests per second with very low latency and static IP addresses, and suits non-HTTP and extreme-performance workloads.

17. How do Auto Scaling groups work?

Answer flow · 3 steps
  1. An Auto Scaling group keeps a set number of EC2 instances running from a launch template, replaces unhealthy instances and spreads them across availability zones.

  2. Scaling policies adjust capacity: target tracking (for example keep average CPU at 50%), step scaling based on alarms, scheduled scaling for known peaks, and predictive scaling.

  3. It integrates with load balancers for health checks.

18. What is the difference between SQS, SNS and EventBridge?

Answer flow · 3 steps
  1. SQS is a message queue: producers send messages and consumers poll and process them, which decouples services and absorbs spikes; FIFO queues guarantee order.

  2. SNS is publish-subscribe: one message is pushed to many subscribers, such as queues, Lambda functions, email or SMS.

  3. EventBridge is an event bus with content-based routing rules, schedules, and events from AWS services and SaaS apps.

19. How do you secure S3 buckets?

Keep Block Public Access enabled, grant access with IAM policies and bucket policies following least privilege, enable default encryption (SSE-S3 or SSE-KMS), enforce HTTPS, enable versioning and object lock for important data, log access, and serve public content through CloudFront with origin access control. Pre-signed URLs give temporary access to private objects.

20. How do serverless applications with API Gateway and Lambda work?

API Gateway receives HTTP requests and triggers Lambda functions, which run code without servers, scale automatically and charge per request and duration, with data often stored in DynamoDB. Challenges include cold starts (reduced with smaller packages, provisioned concurrency or SnapStart), the 15-minute time limit, connection management to relational databases (RDS Proxy) and observability across many functions.

21. What is infrastructure as code, and which tools do you use?

Answer flow · 3 steps
  1. Infrastructure as code defines cloud resources in files kept in version control, so environments are repeatable, reviewed and easy to recreate.

  2. CloudFormation is AWS's native YAML or JSON tool; the AWS CDK lets you write it in TypeScript or Python; Terraform (or OpenTofu) works across many clouds and providers with HCL.

  3. Changes are planned, reviewed and applied through pipelines.

22. What is the difference between Secrets Manager and Parameter Store?

Answer flow · 4 steps
  1. Both store configuration and secrets encrypted with KMS.

  2. Systems Manager Parameter Store is free for standard parameters and suits configuration values and simple secrets.

  3. Secrets Manager costs more but adds automatic rotation, for example of database passwords, cross-account sharing and replication across regions.

  4. Applications read them at runtime with IAM permissions instead of hard-coding secrets.

High level AWS interview questions

System design, deep internals, leadership and tough follow-ups.

23. How would you design a highly available web application on AWS?

Answer flow · 3 steps
  1. I put the application in an Auto Scaling group across at least two availability zones behind an Application Load Balancer, with the database on RDS or Aurora Multi-AZ, sessions in ElastiCache, static assets on S3 served through CloudFront, and DNS in Route 53 with health checks.

  2. CloudWatch alarms, backups and infrastructure as code complete the setup.

  3. For disaster recovery, data is replicated to a second region.

24. How do you reduce AWS costs?

I find waste with Cost Explorer and tags, right-size over-provisioned instances, stop or schedule non-production resources outside working hours, use Savings Plans or Reserved Instances for steady workloads and Spot Instances for fault-tolerant jobs, apply S3 lifecycle policies, delete unused EBS volumes, snapshots and idle load balancers, and reduce data transfer and NAT gateway costs. Budgets and alerts catch surprises.

25. How do you secure an AWS account?

Protect the root account with MFA and never use it day to day, use IAM Identity Center with roles and least privilege, and use AWS Organizations with service control policies across accounts. Encrypt data with KMS, block public S3 access, keep resources in private subnets, store secrets in Secrets Manager, and enable CloudTrail, GuardDuty, Security Hub and AWS Config for monitoring and compliance.

26. What disaster recovery strategies are there on AWS?

From cheapest and slowest to most expensive and fastest: backup and restore (restore data and rebuild infrastructure, recovery in hours), pilot light (core data replicated and minimal services ready to scale up), warm standby (a scaled-down but running copy in another region) and multi-site active-active (full capacity in several regions). The choice depends on the recovery time objective (RTO) and recovery point objective (RPO).

27. What is the AWS Well-Architected Framework?

Answer flow · 3 steps
  1. It is a set of best practices organised into six pillars: operational excellence, security, reliability, performance efficiency, cost optimisation and sustainability.

  2. Teams use it to review architectures, identify risks and plan improvements, for example multi-AZ deployments for reliability or right-sizing for cost.

  3. The Well-Architected Tool guides reviews with questions for each pillar.

28. Why use multiple AWS accounts, and how do you manage them?

Separate accounts for production, staging, development, security and shared services limit the blast radius of mistakes and attacks and make billing clear. AWS Organizations groups accounts with consolidated billing and service control policies that restrict what accounts can do, Control Tower sets up a governed landing zone, and IAM Identity Center gives users single sign-on into the accounts they need.

29. How do you plan a migration from on-premises to AWS?

Assess the existing applications and dependencies, then choose a strategy for each from the 7 Rs: retire, retain, rehost (lift and shift), relocate, replatform (small optimisations such as moving to RDS), repurchase (switch to SaaS) and refactor (redesign as cloud-native). Migrate in waves, starting with low-risk applications, using tools such as Application Migration Service and Database Migration Service, then optimise.

30. Design a serverless pipeline that processes uploaded files.

Answer flow · 3 steps
  1. Users upload directly to an S3 bucket with pre-signed URLs.

  2. An S3 event notification sends a message to SQS, which buffers work and allows retries, and a Lambda function processes each file, for example resizing images or parsing invoices, writing results to DynamoDB and output files to another bucket.

  3. Failed messages go to a dead-letter queue, Step Functions orchestrate multi-step processing, and CloudWatch alarms watch errors and queue depth.

Ready to test yourself?Pick your topics and level, answer by voice or text, and get instant feedback. Free.
Start a mock interview

Preparing for a devops engineer interview?

See all DevOps Engineer interview questions, covering Linux, Git, Docker, Kubernetes, CI/CD (GitHub Actions, Jenkins) and more.

Related skill interview questions

More technology interview questions

HR round, company and bank interview questions

Bank and government exams

Interview questions for other fields