Interview questions › AWS
AWS interview questions & answers
100 AWS interview questions, from basic to advanced. Each links to a full answer page with a concise spoken answer, a technical explanation, and a hands-on example.
Tip: paste the job description + your resume into our free resume checker to see which of these skills the role actually requires.
Basic questions
- Explain the difference between a Region, an Availability Zone, and an Edge Location.A Region is a separate geographic AWS area, an Availability Zone is an isolated failure domain inside a Region, and an Edge Location is part of AWS's global edge…
- What is a VPC, and what are its core components (subnets, route tables, IGW, NAT)?A VPC is a logically isolated network in AWS.
- Difference between a public and a private subnet, and how does each reach the internet?A public subnet has a route to an internet gateway and can host internet-facing resources if public addressing and security rules allow it.
- What is the difference between a Security Group and a Network ACL?Security Groups are stateful resource-level firewalls, while Network ACLs are stateless subnet-level firewalls.
- Are Security Groups stateful or stateless? What about NACLs?Security Groups are stateful, so allowed request traffic automatically permits the response path.
- What is an Internet Gateway versus a NAT Gateway, and when do you need each?An Internet Gateway gives public subnets a route to the internet.
- How does a NAT Gateway differ from a NAT instance?A NAT Gateway is AWS-managed, highly available within an AZ, and simpler to operate.
- Explain VPC peering and its limitations (e.g., non-transitive routing).VPC peering privately connects two non-overlapping VPCs, but routing is non-transitive.
- What is a Transit Gateway and when would you use it over peering?Transit Gateway is a managed regional network hub for many VPCs, VPNs, and Direct Connect attachments.
- What are VPC endpoints, and what is the difference between Gateway and Interface endpoints?VPC endpoints keep traffic to supported AWS services on private AWS networking instead of the public internet.
- Explain the difference between IAM users, groups, roles, and policies.IAM users are long-lived identities, groups organize users, roles are assumable identities with temporary credentials, and policies define permissions.
- What is the difference between an IAM role and an IAM user, and when do you use a role?An IAM user is persistent and often has long-lived credentials; an IAM role is assumed temporarily by a trusted principal.
- How does an EC2 instance assume a role, and why is that better than embedding keys?EC2 assumes a role through an instance profile and retrieves temporary credentials from the Instance Metadata Service.
- What is the difference between an identity-based and a resource-based policy?Identity-based policies attach to users, groups, or roles and define what they can do.
- Explain how an IAM policy is evaluated when there is both an allow and an explicit deny.IAM starts from implicit deny.
- What is an IAM permissions boundary, and when would you use one?A permissions boundary sets the maximum permissions a user or role can receive.
- What are AWS Organizations and Service Control Policies (SCPs)?AWS Organizations manages multiple AWS accounts centrally, and SCPs define maximum permissions for accounts or OUs.
- What is the principle of least privilege, and how do you enforce it on AWS?Least privilege means granting only the actions, resources, and duration required for a task.
- How would you give a Kubernetes pod scoped AWS permissions (IRSA / IAM Roles for Service Accounts)?For EKS pods, I use IRSA or EKS Pod Identity to map a Kubernetes service account to a scoped IAM role.
- What are the main EC2 instance families, and how do you choose one?EC2 families include general purpose, compute optimized, memory optimized, storage optimized, accelerated computing, and burstable.
- Explain On-Demand, Reserved, Spot, and Savings Plans pricing and when to use each.On-Demand is flexible pay-as-you-go, Reserved Instances and Savings Plans discount predictable usage, and Spot is cheap spare capacity that can be interrupted.
- What is an Auto Scaling Group, and what are the scaling policy types?An Auto Scaling Group maintains desired EC2 capacity, replaces unhealthy instances, and scales using policies such as target tracking, step scaling, scheduled…
- Difference between a launch template and a launch configuration.Launch templates are the modern EC2 launch definition with versioning and support for newer features.
- How does an Elastic Load Balancer work, and what are ALB vs NLB vs CLB?Elastic Load Balancing distributes traffic to healthy targets.
- When would you choose an ALB over an NLB?I choose ALB when I need HTTP features such as host/path routing, redirects, headers, WAF, authentication, or Kubernetes ingress.
- What is a target group, and how do health checks work on a load balancer?A target group is the backend pool for a load balancer.
- Explain the difference between vertical and horizontal scaling on AWS.Vertical scaling means making one resource bigger; horizontal scaling means adding more resources.
- What are the S3 storage classes, and how do you pick between them?S3 storage classes balance cost, durability, access frequency, and retrieval time.
- How does S3 lifecycle management work?S3 lifecycle rules automatically transition or expire objects, noncurrent versions, and incomplete multipart uploads.
- Explain S3 bucket policies versus IAM policies versus ACLs.S3 bucket policies are resource policies, IAM policies are identity policies, and ACLs are older object/bucket grants.
- How do you make an S3 bucket private and prevent public exposure?To keep an S3 bucket private, I enable Block Public Access, disable ACLs with bucket owner enforced mode, avoid public policies, grant only scoped roles, require…
- What is S3 versioning, and how does it interact with lifecycle rules?S3 versioning keeps previous object versions and uses delete markers instead of immediate permanent delete.
Intermediate questions
- Explain S3 encryption options: SSE-S3, SSE-KMS, SSE-C, and client-side.SSE-S3 uses S3-managed encryption keys, SSE-KMS uses KMS keys with stronger control and audit, SSE-C uses customer-provided keys, and client-side encryption happens…
- What is the difference between EBS and instance store?EBS is persistent block storage attached to EC2 and can survive stop/start or termination if configured.
- What are the EBS volume types and their use cases?gp3 is the common general-purpose EBS default, io2 is for high-IOPS low-latency critical workloads, st1 is throughput HDD, and sc1 is cold HDD.
- How do EBS snapshots work, and are they incremental?EBS snapshots are point-in-time backups and are incremental after the first snapshot.
- What is EFS, and when would you use it over EBS or S3?EFS is managed elastic NFS shared storage mountable by multiple compute nodes across AZs.
- Explain Amazon RDS and the engines it supports.RDS is AWS-managed relational database service for engines such as PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Aurora.
- What is Multi-AZ in RDS, and how does failover work?RDS Multi-AZ is primarily high availability.
- Difference between RDS Multi-AZ and read replicas.Multi-AZ is for availability and failover; read replicas are for read scaling and sometimes DR.
- What is Amazon Aurora, and how does it differ from standard RDS?Aurora is AWS's cloud-native MySQL/PostgreSQL-compatible relational engine with distributed storage, fast replication, reader endpoints, and strong HA features.
- What is DynamoDB, and when would you choose it over RDS?DynamoDB is managed NoSQL for high-scale, low-latency key-value/document workloads.
- Explain DynamoDB partition keys, sort keys, and the importance of access patterns.DynamoDB partition keys distribute data and traffic; sort keys order related items and support range queries.
- What is ElastiCache, and what is the difference between Redis and Memcached on it?ElastiCache provides managed in-memory caching.
- What is AWS Lambda, and what are its key limits (timeout, memory, package size)?Lambda runs code in response to events without managing servers.
- Explain a Lambda cold start and how to reduce it.A Lambda cold start is extra latency when AWS initializes a new execution environment.
- How do you trigger a Lambda function - name several event sources.Lambda can be triggered by API Gateway, ALB, S3, SQS, SNS, EventBridge, DynamoDB Streams, Kinesis, Step Functions, CloudWatch Logs, Cognito, and direct SDK calls.
- What is API Gateway, and how does it integrate with Lambda?API Gateway is a managed API front door for exposing, securing, throttling, and routing APIs.
- What is Amazon ECR, and how does it relate to EKS and Docker?ECR is AWS's managed container registry for Docker/OCI images.
- What is Amazon EKS, and what does AWS manage versus what you manage?EKS is AWS-managed Kubernetes.
- Explain the EKS control plane versus worker node responsibilities.The EKS control plane includes managed API server and etcd; worker nodes run kubelet, pods, networking components, and container runtime.
- What are managed node groups versus self-managed nodes versus Fargate on EKS?Managed node groups simplify EC2 worker lifecycle, self-managed nodes give more control, and Fargate runs pods without node management but with constraints.
- How does the AWS VPC CNI assign pod networking on EKS?The AWS VPC CNI gives pods routable VPC IPs by assigning ENI secondary IPs or prefixes from subnets to nodes.
- What is the AWS Load Balancer Controller, and what does it provision?The AWS Load Balancer Controller watches Kubernetes Ingress and Service resources and provisions AWS ALBs or NLBs.
- How do you authenticate kubectl to an EKS cluster (aws-auth / access entries)?kubectl to EKS uses AWS IAM authentication, then Kubernetes authorization.
- What is CloudWatch, and what is the difference between metrics, logs, and alarms?CloudWatch provides metrics, logs, dashboards, and alarms.
- What are CloudWatch custom metrics, and how do you publish them?Custom CloudWatch metrics are application or business metrics that AWS does not emit by default.
- What is the difference between CloudWatch Logs and CloudTrail?CloudWatch Logs stores application and service log events; CloudTrail records AWS API activity.
- What does CloudTrail record, and why does it matter for security and audits?CloudTrail records AWS account activity such as IAM changes, security group updates, S3 policy changes, and optional data events.
- What is AWS Config, and how does it differ from CloudTrail?AWS Config records resource configuration history and compliance; CloudTrail records API calls.
- What is Route 53, and what routing policies does it support?Route 53 is AWS DNS with hosted zones, domain registration, health checks, and routing policies such as simple, weighted, latency, failover, geolocation,…
- Explain Route 53 health checks and failover routing.Route 53 health checks monitor endpoint or alarm health and can drive failover routing.
- What is the difference between a CNAME and an Alias record in Route 53?A CNAME maps a DNS name to another name and usually cannot be used at the zone apex.
- What is CloudFront, and how does it improve performance and reduce cost?CloudFront is AWS's CDN.
- What is AWS KMS, and what is the difference between an AWS-managed and a customer-managed key?KMS manages cryptographic keys used by AWS services and applications.
Advanced questions
- What is the difference between KMS and Secrets Manager?KMS manages encryption keys; Secrets Manager stores and rotates secrets.
- What is the difference between Secrets Manager and SSM Parameter Store?Secrets Manager is best for secrets needing rotation and version staging.
- How does Secrets Manager rotation work?Secrets Manager rotation normally uses a Lambda function that creates, applies, tests, and promotes a new secret version.
- What is AWS CloudFormation, and how does it compare to Terraform?CloudFormation is AWS-native IaC; Terraform is multi-provider IaC with external state.
- What is a CloudFormation change set and a drift detection?A CloudFormation change set previews stack changes before execution.
- What is the AWS Well-Architected Framework, and what are its pillars?The AWS Well-Architected Framework reviews workloads across Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability.
- How would you design a highly available web application across multiple AZs?For a highly available web app, I deploy across multiple AZs with ALB, private app subnets, autoscaling compute, managed multi-AZ data services, monitoring, backups,…
- How do you design for disaster recovery - explain RTO and RPO and the DR strategies.DR design starts with RTO and RPO.
- Compare backup-and-restore, pilot light, warm standby, and multi-site DR strategies.Backup-and-restore is cheapest and slowest; pilot light keeps core pieces ready; warm standby runs a scaled-down environment; multi-site runs active environments.
- How would you secure data in transit and at rest across an AWS workload?I secure data in transit with TLS and data at rest with encryption across S3, EBS, RDS, DynamoDB, EFS, snapshots, backups, and logs.
- How do you detect and reduce unexpected AWS cost increases?For unexpected AWS cost spikes, I detect with Budgets, Cost Anomaly Detection, Cost Explorer, CUR, and tags, then identify the driver and remediate with rightsizing,…
- What AWS tools help with cost visibility (Cost Explorer, Budgets, CUR)?Cost visibility tools include Cost Explorer, Budgets, Cost and Usage Report, Cost Anomaly Detection, Compute Optimizer, Trusted Advisor, and billing dashboards.
- How would you right-size EC2 and RDS instances to cut spend without hurting reliability?Rightsizing EC2 and RDS means comparing actual CPU, memory, I/O, network, latency, connections, and peak patterns against capacity.
- Explain how you would migrate a workload from on-prem to AWS.For on-prem to AWS migration, I discover dependencies, classify workloads by migration strategy, build a landing zone, design connectivity/security/observability,…
- What is the difference between SQS and SNS, and when do you use each?SQS is a queue for decoupled work processing; SNS is pub/sub fan-out notification.
- What is the difference between an SQS standard and FIFO queue?SQS Standard offers high throughput with at-least-once delivery and best-effort ordering.
- What is EventBridge, and how does it differ from SNS?EventBridge is an event bus with filtering, routing, schedules, SaaS integrations, archives, and replay.
- What is AWS Systems Manager, and how is Session Manager safer than SSH bastions?Systems Manager provides operational capabilities like Session Manager, Run Command, Patch Manager, Parameter Store, Automation, and Inventory.
- How would you patch a fleet of EC2 instances at scale?To patch EC2 fleets, I use SSM Patch Manager or immutable AMI replacement.
- What is an AMI, and how do you build standardised, hardened images?An AMI is a launch template image for EC2.
- How do you troubleshoot an EC2 instance that is unreachable over SSH?For unreachable SSH, I check instance state, status checks, IP path, security groups, NACLs, routes, public/VPN path, key/user, sshd, host firewall, disk, CPU, and logs.
- How do you debug intermittent 5xx errors behind an ALB?For intermittent 5xx behind ALB, I separate ELB-generated errors from target errors, inspect ALB metrics/access logs, correlate by target/path/AZ/deployment, then…
- How would you architect a multi-account AWS strategy with Organizations and landing zones?A multi-account strategy uses Organizations and OUs to isolate workloads, environments, security, networking, logs, and shared services.
- What is AWS WAF, and what kinds of attacks does it mitigate?AWS WAF protects HTTP applications behind CloudFront, ALB, API Gateway, or AppSync from application-layer attacks like SQL injection, XSS, bad bots, abusive IPs, and…
- What is GuardDuty, and what does it detect?GuardDuty is managed threat detection using AWS telemetry such as CloudTrail, VPC flow, DNS, and supported workload signals.
- What is the difference between GuardDuty, Inspector, and Security Hub?GuardDuty detects suspicious activity, Inspector finds vulnerabilities in workloads and images, and Security Hub aggregates findings and posture checks.
- How do you enforce tagging and governance across many AWS accounts?For tagging and governance, I combine tag policies, SCPs, IAM conditions, Config rules, CI/CD checks, cost allocation tags, and remediation workflows.
- What is the difference between a service quota and a rate limit, and how do you handle throttling?A service quota limits resource quantities or capacity; a rate limit throttles request speed.
- How would you set up centralised logging across multiple AWS accounts?Centralized logging uses dedicated log archive/security accounts, organization trails, Config aggregation, VPC/ALB/WAF/app log delivery, encryption, retention,…
- What is cross-account access, and how do you implement it securely with roles?Cross-account access is usually implemented with a role in the target account, a trust policy for the source principal, least-privilege permissions, and STS…
- How do you rotate and manage access keys, and why prefer roles over long-lived keys?I prefer roles and federation over long-lived access keys.
- Explain how you would design a secure, private EKS cluster with no public API endpoint.For a private EKS cluster, I disable public API endpoint access, use private subnets, private connectivity for admins, VPC endpoints or controlled egress, scoped IAM,…
- What recent AWS service or feature have you adopted, and what problem did it solve for you?A strong recent-feature answer should name a real feature, the problem it solved, and the measured outcome.
- How would you design a landing zone for a new organisation adopting AWS at scale?A landing zone for AWS at scale establishes accounts, OUs, identity, networking, logging, security guardrails, tagging, budgets, account vending, and baseline IaC so…