AWS Interview Questions and Answers

52 questions with short, clear answers · Updated December 2026

These are the AWS questions that come up most in interviews for cloud engineer, cloud support, DevOps and solutions architect roles. They start with the basics a fresher is expected to know and move on to networking, security and the scenario questions that experienced candidates get.

Read each answer, then try explaining it out loud in your own words and doing it once in an AWS account: interviewers quickly notice the difference between a memorised answer and hands-on experience.

Cloud and AWS basics

Q1. What is cloud computing, and what are IaaS, PaaS and SaaS?

Cloud computing is renting computing resources (servers, storage, databases, networking) over the internet and paying for what you use, instead of buying and running your own hardware. IaaS gives you raw infrastructure such as EC2 virtual machines; PaaS gives you a managed platform where you only deploy code, such as Elastic Beanstalk; SaaS is a finished application you simply use, such as Gmail.

Q2. What is the difference between a Region, an Availability Zone and an edge location?

A Region is a separate geographic area, such as Mumbai (ap-south-1). Each Region has several Availability Zones: one or more data centres with independent power and networking, close enough for low-latency links. Edge locations are smaller sites used by CloudFront and Route 53 to serve content and DNS close to users. You spread an application across AZs for high availability and across Regions for disaster recovery.

Q3. Explain the AWS shared responsibility model.

AWS is responsible for security "of" the cloud: the data centres, hardware, network and the software that runs managed services. The customer is responsible for security "in" the cloud: their data, IAM users and permissions, operating system patches on EC2, security groups and encryption settings. The split moves with the service: on EC2 you patch the OS, on RDS or Lambda AWS does it.

Q4. What are the pillars of the AWS Well-Architected Framework?

There are six: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization and Sustainability. Architects use them as a checklist when reviewing a design, and AWS offers the free Well-Architected Tool to run a review against them.

Q5. How do you control and estimate AWS costs?

Use the AWS Pricing Calculator before building, AWS Budgets to get alerts when spending crosses a limit, and Cost Explorer to see where money goes. Tag resources by project or team, right-size instances, stop what is idle, use Savings Plans or Reserved Instances for steady workloads and Spot for interruptible ones, and move old data to cheaper S3 storage classes.

Q6. What are the different ways to access and manage AWS?

The AWS Management Console (web), the AWS CLI, the SDKs for languages such as Python (boto3) and Java, and infrastructure-as-code tools such as CloudFormation, the AWS CDK and Terraform. In real projects the console is used for learning and checking; changes are made through code so they are repeatable and reviewed.

EC2, Auto Scaling, load balancers and Lambda

Q7. What is an EC2 instance, and what is an AMI?

An EC2 instance is a virtual server in AWS. An AMI (Amazon Machine Image) is the template it starts from: the operating system, pre-installed software and the root volume snapshot. You can create your own AMI from a configured instance to launch identical servers quickly, for example in an Auto Scaling group.

Q8. What EC2 pricing options are there?

On-Demand (pay per second or hour, no commitment), Savings Plans and Reserved Instances (discount for a 1- or 3-year commitment), Spot Instances (spare capacity at a large discount, but AWS can reclaim it with a two-minute warning), and Dedicated Hosts or Dedicated Instances for licensing or compliance needs. A common mix is Savings Plans for the baseline and Spot for batch or stateless work.

Q9. What are the main EC2 instance families?

General purpose (T and M, for example t3 and m7g) for balanced workloads, compute optimised (C) for CPU-heavy work, memory optimised (R, X) for databases and caches, storage optimised (I, D) for high disk throughput, and accelerated computing (P, G, Inf, Trn) for GPUs and machine learning. A "g" in the name, as in m7g, means an AWS Graviton (ARM) processor, which is usually cheaper for the same performance.

Q10. What is user data in EC2?

User data is a script (shell or cloud-init) that runs when an instance first boots. It is used to install packages, pull application code or join a cluster automatically, so new instances in an Auto Scaling group come up ready without manual work.

Q11. How does Auto Scaling work?

An Auto Scaling group keeps a minimum, desired and maximum number of instances built from a launch template. It replaces unhealthy instances and adds or removes instances through scaling policies, for example target tracking to keep average CPU near 50%, scheduled scaling for known peaks, or predictive scaling. It is usually placed behind a load balancer across several AZs.

Q12. What is the difference between an Application Load Balancer and a Network Load Balancer?

An ALB works at layer 7 (HTTP/HTTPS): it can route by path or host name, terminate TLS, and send traffic to EC2, containers or Lambda. An NLB works at layer 4 (TCP/UDP/TLS): it handles very high throughput with low latency and can have static IP addresses. Use ALB for web applications and microservices, NLB for non-HTTP protocols or when you need fixed IPs. The Gateway Load Balancer is for inserting third-party firewalls and appliances.

Q13. What is AWS Lambda, and what are its limits?

Lambda runs your code in response to events (an API call, an S3 upload, a queue message) without you managing servers, and you pay per request and per millisecond of run time. A single invocation can run for at most 15 minutes, and memory can be set up to 10 GB, with CPU scaling with memory. Long-running or always-on workloads are usually better on containers or EC2.

Q14. What is a Lambda cold start, and how do you reduce it?

A cold start is the extra delay when Lambda has to create a new execution environment and load your code before handling a request. You reduce it by keeping the package small, initialising SDK clients outside the handler, choosing a fast-starting runtime, and using Provisioned Concurrency (or SnapStart for supported runtimes) for latency-sensitive functions.

Q15. What is the difference between stopping, hibernating and terminating an EC2 instance?

Stopping shuts the instance down; EBS volumes are kept and you stop paying for compute, but data on instance store is lost and the public IP usually changes. Hibernating also saves the RAM contents to the EBS root volume so the instance resumes where it left off. Terminating deletes the instance, and its root EBS volume too unless "delete on termination" was turned off.

S3, EBS and EFS

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

S3 is object storage accessed over HTTPS, practically unlimited, used for files, backups, logs and static websites. EBS is block storage, a virtual disk attached to one EC2 instance in one AZ. EFS is a managed NFS file system that many Linux instances across AZs can mount at the same time. Use EBS for an instance's disk, EFS for shared files and S3 for everything stored as objects.

Q17. What S3 storage classes are there, and when would you use each?

S3 Standard for frequently used data; S3 Intelligent-Tiering when access patterns are unknown; Standard-IA and One Zone-IA for data read rarely but needed quickly; Glacier Instant Retrieval, Glacier Flexible Retrieval and Glacier Deep Archive for archives, from milliseconds to hours to retrieve; and S3 Express One Zone for very low-latency access in one AZ. Lifecycle rules move objects between classes automatically.

Q18. How durable is S3, and is it consistent?

S3 Standard is designed for 99.999999999% (eleven nines) durability by storing data across multiple AZs. Since December 2020, S3 gives strong read-after-write consistency for all PUT, DELETE and LIST operations, so a read right after a successful write returns the new data.

Q19. How do you secure an S3 bucket?

Keep Block Public Access turned on, grant access with IAM policies and bucket policies following least privilege, leave ACLs disabled (Object Ownership: bucket owner enforced), encrypt data (SSE-S3 is on by default, SSE-KMS for key control), require HTTPS in the bucket policy, and turn on versioning, server access logs or CloudTrail data events for auditing. For public websites, serve through CloudFront with Origin Access Control instead of making the bucket public.

Q20. What are S3 versioning and lifecycle rules?

Versioning keeps every version of an object, so an overwrite or delete can be undone; a delete just adds a delete marker. Lifecycle rules automatically move objects to cheaper storage classes after a number of days, expire old versions, and clean up incomplete multipart uploads, which keeps versioned buckets from growing costs.

Q21. What are EBS volume types, and what is a snapshot?

gp3 is the default general-purpose SSD, where you set IOPS and throughput separately from size; io2 Block Express is for databases needing high, consistent IOPS; st1 and sc1 are cheaper HDDs for throughput-heavy or cold data. A snapshot is an incremental, point-in-time backup of a volume stored regionally by AWS; you can copy it to other Regions and create new volumes from it.

Q22. What is a pre-signed URL in S3?

A pre-signed URL gives time-limited access to a private object, signed with the credentials of someone who has permission. It lets a user download or upload one file directly to S3 without making the bucket public or giving them AWS credentials, for example for invoice downloads or browser uploads.

VPC and networking

Q23. What is a VPC, and what is the difference between a public and a private subnet?

A VPC is your own isolated virtual network in a Region, with an IP range you choose (for example 10.0.0.0/16). Subnets divide it, each in one AZ. A public subnet has a route to an Internet Gateway, so instances with public IPs are reachable from the internet; a private subnet has no such route, and its instances reach the internet, if at all, through a NAT gateway.

Q24. What is the difference between a security group and a network ACL?

A security group is a stateful firewall attached to an instance or network interface: it has only allow rules, and return traffic is allowed automatically. A network ACL is a stateless firewall at the subnet level: it has numbered allow and deny rules evaluated in order, and you must allow return traffic (ephemeral ports) explicitly. Security groups are the main control; NACLs are an extra layer, for example to block an IP range.

Q25. What is the difference between an Internet Gateway and a NAT gateway?

An Internet Gateway allows two-way traffic between the internet and resources with public IPs in public subnets. A NAT gateway sits in a public subnet and lets instances in private subnets start outbound connections (for updates or APIs) while blocking connections started from the internet. NAT gateways are charged per hour and per GB, so put one per AZ for resilience and watch the cost.

Q26. How can two VPCs talk to each other?

VPC peering connects two VPCs (even in different accounts or Regions) privately, but it is not transitive and the IP ranges must not overlap. For many VPCs, AWS Transit Gateway acts as a central hub. To expose just one service, use AWS PrivateLink (an interface VPC endpoint), which also works with overlapping ranges.

Q27. What are VPC endpoints?

VPC endpoints let resources in a VPC reach AWS services without going over the internet or through a NAT gateway. Gateway endpoints (free) exist for S3 and DynamoDB and are added to route tables. Interface endpoints (PrivateLink) create private network interfaces for most other services and are charged per hour and per GB.

Q28. What routing policies does Route 53 support?

Simple, weighted (split traffic by percentage, useful for canary releases), latency-based (send users to the lowest-latency Region), failover (active-passive with health checks), geolocation and geoproximity (by user location), multivalue answer, and IP-based routing. Route 53 also registers domains and hosts public and private DNS zones.

Q29. What is CloudFront, and why use it?

CloudFront is AWS's content delivery network. It caches content at edge locations near users, which cuts latency and load on the origin (S3, a load balancer or any HTTP server). It also gives free TLS certificates through ACM, DDoS protection with AWS Shield Standard, optional AWS WAF rules, and lets you keep an S3 origin private with Origin Access Control.

Q30. How do you connect an on-premises data centre to AWS?

Site-to-Site VPN creates encrypted tunnels over the internet and can be set up in hours. AWS Direct Connect is a dedicated private connection with steadier bandwidth and latency, but it takes longer to provision. Many companies use Direct Connect as the main link with a VPN as backup.

IAM and security

Q31. What is the difference between an IAM user, group, role and policy?

A user is an identity with long-term credentials for a person or application. A group is a set of users that share policies. A role is an identity with temporary credentials that a trusted entity assumes, such as an EC2 instance, a Lambda function or a user from another account. A policy is a JSON document that allows or denies actions on resources, and it is attached to users, groups or roles.

Q32. Why should an application on EC2 use an IAM role instead of access keys?

A role attached through an instance profile gives the application temporary credentials that rotate automatically, so there are no long-term keys stored on the server or in code that could leak. Permissions can be changed on the role without touching the server. The same idea applies to Lambda execution roles and IAM roles for EKS service accounts.

Q33. How does IAM evaluate a request when several policies apply?

By default everything is denied. An explicit Deny in any applicable policy always wins. Otherwise the request is allowed only if some policy explicitly allows it and no boundary blocks it: Service Control Policies in AWS Organizations, permission boundaries and session policies can only limit permissions, never grant them.

Q34. How should the AWS root user be protected?

Turn on MFA for the root user, do not create access keys for it, and use it only for the few tasks that need it (such as closing the account or changing the support plan). Day-to-day work is done through IAM Identity Center or IAM roles with least privilege. In AWS Organizations, root access for member accounts can be managed centrally.

Q35. What is the difference between KMS, Secrets Manager and Parameter Store?

AWS KMS creates and controls encryption keys used by S3, EBS, RDS and other services. Secrets Manager stores secrets such as database passwords and API keys and can rotate them automatically. Systems Manager Parameter Store stores configuration values and secrets (SecureString, encrypted with KMS) and is cheaper, but has no built-in rotation.

Q36. Which AWS services help detect threats and misconfigurations?

Amazon GuardDuty detects threats from logs and network activity; AWS Security Hub collects findings and checks accounts against standards such as CIS; AWS Config records resource configurations and flags rules that are broken; Amazon Inspector scans EC2, container images and Lambda for vulnerabilities; and IAM Access Analyzer finds resources shared outside your account.

Databases

Q37. What is the difference between RDS Multi-AZ and a read replica?

Multi-AZ keeps a standby copy in another AZ with synchronous replication and fails over automatically, so it is for high availability, not for spreading reads (in the classic one-standby setup the standby serves no traffic). A read replica uses asynchronous replication to scale read traffic and can be in another Region; it can be promoted manually, for example for disaster recovery.

Q38. When would you choose DynamoDB over RDS?

Choose DynamoDB for key-value or simple document access at any scale with single-digit-millisecond latency and no servers to manage, when you know your access patterns, for example sessions, carts or IoT data. Choose RDS or Aurora when you need SQL joins, complex queries, transactions across many tables, or an existing relational schema.

Q39. What is Amazon Aurora?

Aurora is AWS's MySQL- and PostgreSQL-compatible relational database. Its storage is shared and replicated six ways across three AZs, it supports up to 15 low-lag read replicas and fast failover, and Aurora Serverless v2 scales capacity automatically. It costs more than standard RDS but gives better availability and performance.

Q40. What are DynamoDB partition keys, and what is a hot partition?

The partition key decides which partition stores an item, so it spreads data and traffic. A hot partition happens when many requests hit the same key value, for example using today's date as the key, which causes throttling. Choose a key with many distinct, evenly used values, and add a sort key for range queries within a partition.

Q41. What is ElastiCache used for?

ElastiCache is a managed in-memory cache (Valkey, Redis OSS or Memcached). It is put in front of a database to serve frequent reads in microseconds, store user sessions, and run leaderboards or rate limiters, which reduces database load and cost.

Monitoring, automation and integration

Q42. What is the difference between CloudWatch, CloudTrail and AWS Config?

CloudWatch is for performance: metrics, logs, alarms and dashboards ("is my server healthy?"). CloudTrail records API calls ("who did what, and when?"). AWS Config records how resource configurations change over time and checks them against rules ("what did this security group look like last week, and is it compliant?").

Q43. What is CloudFormation, and how does it compare with Terraform?

CloudFormation is AWS's native infrastructure-as-code service: you describe resources in YAML or JSON templates and AWS creates and updates them as a stack, keeping state for you. Terraform works across many clouds and services and keeps its own state file. The AWS CDK lets you write CloudFormation in languages such as TypeScript or Python.

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

SQS is a queue: messages wait until a consumer pulls and processes them, which decouples services and absorbs traffic spikes. SNS is publish-subscribe: one message is pushed to many subscribers (SQS queues, Lambda, email, SMS). EventBridge is an event bus that routes events from AWS services, SaaS apps and your own code to targets based on rules, and also schedules jobs.

Q45. What are the ways to run containers on AWS?

Amazon ECS is AWS's own container orchestrator; Amazon EKS runs managed Kubernetes. Both can run on EC2 instances you manage or on AWS Fargate, where AWS runs the servers and you pay per task or pod. Images are stored in Amazon ECR. App Runner is a simpler option for web services.

Q46. How would you build a CI/CD pipeline on AWS?

Code in a Git repository (GitHub, GitLab or another provider), a build and test stage in CodeBuild or GitHub Actions, images pushed to ECR, and deployment through CodePipeline with CodeDeploy (blue/green or rolling), or through ECS, EKS or CloudFormation updates. Pipelines use IAM roles (with OIDC for GitHub Actions) rather than stored access keys.

Scenario questions

Q47. Design a highly available web application on AWS.

Route 53 points to CloudFront, which sits in front of an Application Load Balancer. The ALB spreads traffic to an Auto Scaling group across at least two AZs in private subnets. The database is RDS or Aurora with Multi-AZ, static files are in S3, sessions are in ElastiCache or DynamoDB rather than on the servers, CloudWatch alarms watch health, and backups or a second Region cover disaster recovery.

Q48. An EC2 instance in a private subnet cannot reach the internet. How do you troubleshoot it?

Check that the subnet's route table sends 0.0.0.0/0 to a NAT gateway, that the NAT gateway is in a public subnet whose route table points to an Internet Gateway, that the security group allows the outbound traffic, that the network ACL allows both outbound traffic and the return traffic on ephemeral ports, and that DNS resolution is enabled in the VPC. VPC Reachability Analyzer can trace the path for you.

Q49. Your AWS bill suddenly doubled. What do you do?

Open Cost Explorer and group by service, Region, usage type and tag to find what grew. Common causes are forgotten instances or volumes, NAT gateway data transfer, an unexpectedly busy Lambda or log group, unattached Elastic IPs, or resources launched in another Region. Fix the cause, then set AWS Budgets alerts and Cost Anomaly Detection so it is caught early next time.

Q50. How would you migrate an on-premises application to AWS?

Start with discovery: list servers, dependencies and data size. Choose a strategy per application from the "7 Rs" (retire, retain, rehost, relocate, replatform, repurchase, refactor). Common tools are AWS Application Migration Service for lift-and-shift of servers, Database Migration Service for databases, and DataSync or Snowball for bulk data. Migrate in waves, test, then cut over with a rollback plan.

Q51. How do you give a team in another AWS account access to an S3 bucket?

Create an IAM role in the bucket's account whose trust policy allows the other account (or specific roles in it) to assume it, with a policy granting only the needed S3 actions. Alternatively, add a bucket policy allowing the other account's role, and make sure that role's own policy also allows the actions. If objects are encrypted with SSE-KMS, the KMS key policy must also allow them.

Q52. What are the common disaster recovery strategies on AWS?

From cheapest and slowest to most expensive and fastest: backup and restore; pilot light (core data replicated, servers off until needed); warm standby (a scaled-down copy always running); and multi-site active-active. You choose based on the business RTO (how long you can be down) and RPO (how much data you can lose).

Learn AWS hands-on

Knowing the answers is half the job; interviewers also ask what you have built. Technical Guftgu's AWS training is taught in Hindi with live classes, labs and project work, plus resume and mock-interview help. We do not promise or guarantee job placement.

AWS training near you

More interview questions

TECHNICAL GUFTGU

© 2026 Technical Guftgu. All rights reserved.