AWS scenario based interview questions describe a real problem, such as an instance that cannot reach the internet or a sudden cost spike, and ask how you would fix it. Answer by clarifying the requirement, naming the AWS services involved, explaining the trade offs and saying how you would verify and monitor the fix.
Definition questions like what is S3 are fading from DevOps and cloud interviews. Panels now prefer scenarios: something is broken, slow, insecure or expensive, and you need to fix it while explaining your thinking. These rounds are common for AWS roles at product startups, at global capability centres and on client projects at TCS, Wipro and Accenture.
This guide gives you 16 realistic scenarios with short, correct model answers, a worked troubleshooting walkthrough and a script for speaking through any scenario. For broader DevOps topics such as CI/CD and Kubernetes, see our DevOps engineer interview questions page.
How should you approach an AWS scenario question?
Do not jump straight to a service name. Interviewers mark you on the path you take, so make it visible. A simple four step pattern works for almost every scenario:
Clarify: ask about scale, budget, compliance needs and what good looks like, such as uptime or recovery targets.
Design or diagnose: name the services and walk through the flow, layer by layer.
Trade offs: mention cost, complexity and what you would choose differently at another scale.
Verify: say how you would test the fix and which metrics or alarms would prove it works.
Which AWS networking scenarios come up most?
1. An EC2 instance in a private subnet cannot download updates from the internet. What do you check?
A private subnet needs a NAT gateway placed in a public subnet, and the private subnet's route table needs a 0.0.0.0/0 route pointing to that NAT gateway. The public subnet itself must route to an internet gateway. Then check that the security group allows outbound traffic and that the network ACL allows both the outbound request and the return traffic on ephemeral ports.
2. What is the difference between a security group and a network ACL, and when does it matter?
Security groups work at the instance or network interface level, are stateful and only have allow rules. Network ACLs work at the subnet level, are stateless, support allow and deny rules and are evaluated in rule number order. It matters when you need to block a specific IP range for a whole subnet, which you can only do with a NACL deny rule.
3. Your application servers need to read from S3 without sending traffic over the internet. How?
Create a VPC gateway endpoint for S3 and add it to the relevant route tables. Traffic then stays on the AWS network and you avoid NAT gateway data processing charges for that traffic. You can also restrict the bucket policy so it only accepts requests that come through that endpoint.
4. Users get 502 errors from your Application Load Balancer. Where do you start?
A 502 usually means the target returned an invalid response or closed the connection. Check the target group health checks, the application logs on the targets and whether the target's security group allows traffic from the load balancer's security group. Also compare the target keep alive timeout with the load balancer idle timeout, because a shorter keep alive on the target can cause intermittent 502s.
What security and IAM scenarios should you prepare?
5. A CI pipeline in account A needs to deploy into account B. How do you set up access?
Create an IAM role in account B with only the permissions the deployment needs, and a trust policy that allows the pipeline's role in account A to assume it. The pipeline then calls sts:AssumeRole and receives temporary credentials. Avoid long lived access keys.
aws sts assume-role --role-arn arn:aws:iam::222222222222:role/DeployRole --role-session-name ci-deploy
6. Developers have hardcoded database passwords in code. How do you fix it?
Move the credentials to AWS Secrets Manager, which supports automatic rotation for supported databases such as Amazon RDS, or to SSM Parameter Store as a SecureString for simpler cases. Give the application's IAM role permission to read only that secret, rotate the exposed password immediately and remove it from the repository history.
7. Someone made an S3 bucket public by mistake. How do you prevent this?
Turn on S3 Block Public Access at the account level, review the bucket policy and ACLs, and use AWS Config rules to flag public buckets. If users need to download files, serve them through CloudFront with Origin Access Control, or share time limited presigned URLs.
8. How do you give engineers shell access to EC2 without opening port 22?
Use AWS Systems Manager Session Manager. The instance needs the SSM agent and an instance profile with the right permissions, and it must reach the Systems Manager endpoints through a NAT gateway or VPC interface endpoints. Sessions can be logged to CloudWatch Logs or S3, which also helps with audits.
How do you answer high availability and disaster recovery scenarios?
9. Design a highly available web application.
Put an Application Load Balancer in front of an Auto Scaling group spread across at least two Availability Zones. Use RDS with Multi-AZ for automatic failover, store static assets in S3 behind CloudFront, and keep sessions out of the instances, for example in ElastiCache or DynamoDB, so any instance can serve any user.
10. Your RDS database is slow because of heavy reporting queries. What do you do?
Add a read replica and point reporting queries at it, so the primary handles transactions. Remember that Multi-AZ standby is for failover and does not serve reads in the classic setup. Also check slow query logs and Performance Insights, because a missing index is often the real cause.
11. The business wants recovery within one hour if a region fails. Which DR strategy?
Ask about RTO and RPO first. AWS describes four common strategies: backup and restore, pilot light, warm standby and multi site active active, in order of rising cost and falling recovery time. A one hour RTO usually points to pilot light or warm standby, with cross region replication for data and Route 53 failover routing with health checks.
12. A Lambda function times out while processing large files. How do you fix it?
Lambda has a maximum timeout of 15 minutes. Check whether memory is too low, since more memory also gives more CPU. If the work truly takes longer, split it into smaller chunks with SQS or Step Functions, or move it to a container on ECS with Fargate.
What DevOps, cost and monitoring scenarios are common?
13. How do you release a new version with zero downtime and an easy rollback?
Use a blue green deployment: run the new version in a separate target group or environment, then shift traffic with the load balancer or CodeDeploy. If metrics look bad, shift traffic back. A canary release that moves a small share of traffic first reduces the risk further.
14. Two engineers ran Terraform at the same time and corrupted the state. How do you prevent it?
Store state remotely in a versioned, encrypted S3 bucket and turn on state locking. The classic setup uses a DynamoDB table for locking, and newer Terraform versions also support native S3 locking. Run applies only from the CI pipeline, not from laptops.
15. The AWS bill jumped this month. How do you investigate?
Open Cost Explorer and group by service, account and tag to find the source. Common causes are idle or oversized instances, NAT gateway data processing, unattached EBS volumes, old snapshots and data transfer. Set AWS Budgets alerts, enforce cost allocation tags, and use Savings Plans for steady workloads and Spot Instances for fault tolerant jobs.
16. Someone deleted a production security group rule. How do you find out who?
Check AWS CloudTrail for the RevokeSecurityGroupIngress event, which shows the identity, time and source IP. Going forward, alert on such events with EventBridge rules and track configuration history with AWS Config.
What does a worked troubleshooting answer look like?
Here is how Arjun, a cloud engineer with three years of experience, walked a panel through scenario 1. Notice that he checks layer by layer and names a way to confirm each step.
Step | What Arjun checked | How he confirmed it |
|---|---|---|
1 | Route table of the private subnet | 0.0.0.0/0 route points to the NAT gateway |
2 | NAT gateway placement and state | Sits in a public subnet, status available, has an Elastic IP |
3 | Public subnet route table | 0.0.0.0/0 route points to the internet gateway |
4 | Security group and NACL | Outbound allowed, NACL allows return traffic on ephemeral ports |
5 | DNS settings | VPC DNS resolution enabled, test with a lookup from the instance |
How do you say it in the interview?
A calm, structured opening buys you thinking time and shows the panel your method. Adapt this script to any scenario:
Let me first confirm a couple of things: is this a production workload, and is there a recovery or uptime target? Assuming yes, I would start at the network layer, then move to permissions, then the application. In one project I faced something similar, where an instance could not reach a package repository, and the cause was a missing route to the NAT gateway after someone recreated the subnet. Once fixed, I added a CloudWatch alarm and a Terraform check so it could not silently happen again.
If you do not know a detail, say how you would find it, for example by checking the AWS documentation or the service quotas page. Panels respect honest reasoning more than a confident guess. Our technical interview tips guide covers more ways to handle questions you are unsure about.
Watch for follow ups too. After a design answer, panels often push on one weak spot: what happens if an Availability Zone goes down, how much will this cost at ten times the traffic, or who gets paged when the alarm fires. Prepare one extra sentence for each, and your answer will feel complete rather than memorised.
How can you practise AWS scenarios before the interview?
Pick five scenarios from this list and answer each aloud in under three minutes. Then build one of them in a free tier account so your story includes real details. Run your answers through mock interviews, which score every answer and show where your explanation gets vague.
If you have already landed the role and need help with real tickets in your first months, AWS job support gives you AI plus expert help during the first 90 days. For the interview itself, InterviewPlan AI's Interview Copilot for technical interviews drafts answers from your own resume in real time, as long as you follow the employer's interview rules.
Want a plan built around the exact job description? Try InterviewPlan AI free with 5 live minutes and 100 AI credits, no card needed, and get likely AWS questions with model answers based on your experience.
Frequently asked questions
What are AWS scenario based interview questions?
They describe a real situation, such as an outage, a security gap or a cost spike, and ask how you would solve it. Instead of definitions, the interviewer wants your reasoning: what you would check, which services you would use, the trade offs and how you would verify the fix.
Which AWS services should I know for a DevOps interview?
Focus on EC2, VPC, IAM, S3, Elastic Load Balancing, Auto Scaling, RDS, Lambda, CloudWatch, CloudTrail, Systems Manager, Secrets Manager and Route 53. For DevOps roles, add ECS or EKS, CodePipeline or another CI tool, and infrastructure as code with Terraform or CloudFormation.
Do I need an AWS certification to pass these interviews?
A certification such as Solutions Architect Associate helps you get shortlisted, but scenario rounds test hands on judgement. Interviewers often prefer a candidate who can describe a real outage they fixed over one who only has a certificate. Build small projects in a free tier account to get real stories.
What is the difference between Multi-AZ and a read replica in RDS?
Multi-AZ keeps a standby copy in another Availability Zone for automatic failover, improving availability. In the classic setup the standby does not serve reads. A read replica is a separate copy that serves read traffic, which helps with performance for reporting or read heavy workloads.
How long should my answer to an AWS scenario be?
Two to four minutes is usually right. Spend a few seconds clarifying, most of the time on your design or diagnosis, and end with how you would verify and monitor the fix. If the panel wants more depth, they will ask follow up questions.
