INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 1–12 of 12 questions
Learn AWS →1.What is the difference between a security group and a NACL?Mid
A security group belongs to an instance, is stateful and only has allow rules. A NACL belongs to a subnet, is stateless, and has numbered allow and deny rules. Most control is done with security groups.
2.How does a private subnet reach the internet?Mid
Through a NAT gateway in a public subnet. The private route table sends 0.0.0.0/0 to the NAT gateway, which sends it on through the internet gateway. Nothing from outside can start a connection in.
3.What is the difference between RDS Multi-AZ and read replicas?Mid
Multi-AZ keeps a standby copy in another zone for failover and is about availability. Read replicas are extra copies that serve reads and are about performance. They can be used together.
4.How does a DynamoDB table choose its keys?Mid
The partition key spreads data and finds items quickly. An optional sort key orders items inside one partition key. Design keys for your queries, because you cannot query well by other attributes without an index.
5.What is the difference between an ALB and an NLB?Mid
An Application Load Balancer works at layer 7, understands HTTP, and routes by path or host. A Network Load Balancer works at layer 4, is very fast, and keeps a fixed IP address.
6.How does Auto Scaling decide to add servers?Mid
A scaling policy watches a metric, such as average CPU or requests per target. Target tracking adds or removes instances to hold the metric near your target, within the minimum and maximum you set.
7.What does CloudTrail record, and how is it different from CloudWatch?Mid
CloudTrail records who called which AWS API and when. CloudWatch collects metrics and logs about how things are running. Use CloudTrail to audit, CloudWatch to watch health.
8.How do you reach a server without opening SSH?Mid
Use Systems Manager Session Manager. The instance has a role and the SSM agent, and you get a shell through AWS with IAM control and logging, with no inbound port open.
9.ECS or EKS?Mid
ECS is simpler and AWS-only, so it is a good start. EKS runs Kubernetes, which is more work but more portable and has a bigger ecosystem. With Fargate, neither needs you to manage servers.
10.When should you use SQS and when SNS?Mid
SQS is a queue: one consumer takes each message, and the queue holds it until it is handled. SNS is publish and subscribe: one message goes to many subscribers. They are often combined, with SNS sending to several SQS queues.
11.What is the difference between a task role and a task execution role in ECS?Mid
The execution role lets ECS pull the image and write logs. The task role is what your own code uses to call AWS services, such as reading an S3 bucket.
12.How can you get a shell on an EC2 instance without opening port 22?Mid
Use Systems Manager Session Manager. The instance needs the SSM Agent and an IAM role with SSM permissions. The session goes over outbound HTTPS and is logged.