DevOps & Cloud Interview Questions

Nivas DevSecOps
8 min readNov 21, 2024

--

- What is the standard port for RDP?
- How do you configure a Windows EC2 instance to join an Active Directory domain?
- How can you copy files from a Linux server to an S3 bucket?
- What permissions do you need to grant for that S3 bucket?
- What are the different types of VPC endpoints and when do you use them?
- How to resolve an image pullback error when using an Alpine image pushed to ECR in a pipeline?
- What is the maximum size of an S3 object?
- What encryption options do we have in S3?
- Can you explain IAM user, IAM role, and IAM group in AWS?
- What is the difference between an IAM role and an IAM policy document?
- What are inline policies and managed policies?
- How can we add a load balancer to Route 53?
- What are A records and CNAME records?
- What is the use of a target group in a load balancer?
- If a target group is unhealthy, what might be the reasons?
- What is the use of below command: Stash, Rebase,Cherrypic.
- What is the difference between git pull and git fetch.
- How you commit code in Git.
- When do we use Grep and Awk
- How do you resolve Git conflict.
- What is Docker Registry.
- How image of Docker is formed.
- Why Docker is there if K8s is taking over the place.
- What is Docker Multistage?
- What is docker Volume?
- What is command to remove Unused Docker Volumes.
- EntryPoint and CMD- What do you know about it.
- Add and Copy Difference.
- Docker Exec and Docker attach difference.

# AWS

- What is AWS?
- What are the key services provided by AWS?
- What is EC2 in AWS?
- What is an S3 bucket?
- Explain the difference between S3 and EBS.
- What is IAM in AWS?
- How does AWS VPC work?
- What are Security Groups and how do they work?
- What is an AWS region?
- What are Availability Zones in AWS?
- What is Auto Scaling?
- What is Elastic Load Balancing?
- What is Route 53?
- Explain the difference between a public and private subnet.
- What is CloudFormation?
- What is AWS Lambda?
- What is Amazon RDS?
- How do you monitor AWS resources?
- What is Amazon DynamoDB?
- What is AWS Elastic Beanstalk?
- What is Amazon CloudFront?
- Explain Amazon SNS.
- What is the difference between RDS and DynamoDB?
- What are EIPs (Elastic IPs)?
- How does AWS CloudTrail work?
- What is Amazon CloudWatch?
- What is the AWS Free Tier?
- What is a NAT Gateway?

- How do you secure data at rest and in transit in AWS?
- Explain the difference between AWS S3 Standard and S3 Glacier.
- How does AWS S3 versioning work?
- What is AWS Elasticache?
- Explain the concept of a bastion host.
- How do you implement high availability in AWS?
- What is AWS Direct Connect?
- What are AWS Managed Services?
- What is AWS Config?
- How do you set up cross-region replication in S3?
- Explain AWS KMS.
- What is Amazon Redshift?
- How does AWS handle data encryption?
- What is Amazon EFS?
- What is AWS CodePipeline?
- How do you implement disaster recovery in AWS?
- What is AWS Step Functions?
- Explain the difference between Spot Instances and Reserved Instances.
- How do you secure an AWS API Gateway?
- What is AWS CodeDeploy?
- What is AWS Snowball?
- How do you manage secrets in AWS?
- Explain AWS Systems Manager.

- Advanced Level
- What is the difference between horizontal and vertical scaling in AWS?
- How does AWS Lambda handle cold starts?
- What is a VPC peering connection and how does it work?
- Explain the use of AWS Transit Gateway.
- What is Amazon EKS?
- How do you manage multi-account AWS environments?
- Explain the concept of serverless architecture in AWS.
- What are AWS Organizations?
- How do you optimize costs in AWS?
- What are the best practices for securing an AWS environment?

# 𝐆𝐢𝐭

1. Describe the difference between `rebase` and `merge` in Git. When would you use one over the other?
2. How would you resolve a complex merge conflict that spans multiple files and involves multiple team members?
3. Explain the concept of Git’s “detached HEAD” state. How can you recover from this state if necessary?
4. What are Git submodules, and when would you use them? How do you manage updates and synchronization for submodules?
5. How do you handle large binary files in a Git repository? What are some strategies or tools you might use?
6. Discuss the implications of Git’s internal storage mechanism (objects, blobs, trees, and commits) on repository performance.
7. Can you describe a scenario where you would use `git reflog`? How does it help in recovering lost commits?
8. How do you perform a Git bisect to find the commit that introduced a bug?

# Terraform

1. Can you describe what workspaces are in Terraform and how they assist with infrastructure management?

2. What are the best practices for managing secrets or sensitive information within Terraform configurations?

3. Could you explain the differences between the `count` and `for_each` meta-arguments in Terraform?

4. How do you manage dependencies between different resources in Terraform configurations?

5. How does Terraform manage state, and why is state management crucial?

6. What role do providers play in Terraform, and how do they aid in managing infrastructure?

7. What techniques can be used to enable parallelism in Terraform operations and enhance performance?

8. What are remote backends in Terraform, and what are the benefits of using them?

9. How can Terraform modules be effectively managed in a large-scale infrastructure setup?

10. What methods are available to prevent concurrent modifications to Terraform state?

11. Can you explain the differences between the `local-exec` and `remote-exec` provisioners in Terraform?

12. How can Terraform state be securely managed across multiple environments or teams?

13. What is the difference between the `taint` and `import` commands in Terraform?

14. How do you detect and address drift in Terraform-managed infrastructure?

15. What are some best practices for organizing Terraform configurations to ensure they are modular and reusable?

# Linux

1. What is the boot process in Linux?
2. How can you create a zero-size file in Linux?
3. What are 𝘀𝗼𝗳𝘁 𝗹𝗶𝗻𝗸𝘀 and 𝗵𝗮𝗿𝗱 𝗹𝗶𝗻𝗸𝘀 in Linux? How do you create them? What are the differences between these two types of links?
4. What is the first line typically written in a shell script? What is its meaning? What happens if this line is omitted, and how do you run the script in such a case?
5. How can you run a shell script in the background in Linux?
6. What is a 𝗰𝗿𝗼𝗻𝘁𝗮𝗯 in Linux? Explain how it works and how to configure and schedule a job using crontab.
7. How do you allow ports in Linux?
8. How do you troubleshoot a remote server that is experiencing issues?
9. What are the 𝗽𝗶𝗻𝗴, 𝘁𝗲𝗹𝗻𝗲𝘁, 𝗰𝘂𝗿𝗹, and 𝘄𝗴𝗲𝘁 commands in Linux?
10. How can you check the status of services in a Linux machine?
11. How do you kill a process in Linux?
12. What are the `𝗻𝗶𝗰𝗲` and `𝗿𝗲𝗻𝗶𝗰𝗲` commands in Linux?
13. What is an 𝗶𝗻𝗼𝗱𝗲 in Linux?
14. How do you check CPU utilization in Linux?
15. What are the differences between the `𝘁𝗼𝗽` and `𝗵𝘁𝗼𝗽` commands?
16. What is a 𝗺𝗼𝘂𝗻𝘁 in Linux, and how do you create one?
17. How do you troubleshoot live logs in Linux?
18. What is the `𝘀𝗲𝗱` command in Linux?
19. What is the `𝗮𝘄𝗸` command in Linux?
20. What are the `𝗴𝗿𝗲𝗽` and `𝗲𝗴𝗿𝗲𝗽` commands in Linux?
21. How can you list only directories in a Linux environment?
22. How do you check the processes running in Linux?
23. How do you get a Java thread dump in Linux?
24. How can you check the running ports on a Linux machine?
25. How do you declare a variable in a shell script?
26. What do `$?`, `$#`, and `$*` represent in shell scripting?
27. How do you read a command line input in a shell script?
28. What is 𝘂𝗺𝗮𝘀𝗸 in Linux?
29. How do you change file permissions in Linux?
30. How can you connect to remote servers without a password? How is this achieved?
31. How do you open a file in read-only mode in the vi editor?
32. What is the purpose of the `𝗲𝘅𝗽𝗼𝗿𝘁` command in Linux?
33. How do you send 𝗲𝗿𝗿𝗼𝗿 𝗹𝗼𝗴𝘀 and 𝘀𝘁𝗱𝗼𝘂𝘁 𝗹𝗼𝗴𝘀 to different files in Linux?
34. What is the `𝗻𝗼𝗵𝘂𝗽` command in Linux?
35. What does the `𝗻𝗲𝘁𝘀𝘁𝗮𝘁` command do in Linux?
36. How do you run a script at 𝗯𝗼𝗼𝘁 𝗹𝗲𝘃𝗲𝗹 in Linux?

# Docker

1. What is Virtualization and operating System-Level Virtualization?
2. What is Docker and its Benefits?
3. What are Docker Containers & and images?
4. Containers vs Virtual Machines
5. Docker Architecture?
6. What is Dockerfile and Why should we use the Dockerfile?
7. Dockerfile Examples
8. Difference Between CMD and ENTRYPOINT
9. How to Reduce Docker Image Size (Best Practices)

# Over all Question for DevOps & Cloud

  • What is the purpose of `.𝗴𝗶𝘁𝗶𝗴𝗻𝗼𝗿𝗲`?
    - How do `𝗴𝗶𝘁 𝗺𝗲𝗿𝗴𝗲` and `𝗴𝗶𝘁 𝗿𝗲𝗯𝗮𝘀𝗲` differ?
    - How do `𝗴𝗶𝘁 𝗿𝗲𝘀𝗲𝘁` and `𝗴𝗶𝘁 𝗿𝗲𝘃𝗲𝗿𝘁` differ?
    - How do `𝗴𝗶𝘁 𝗳𝗲𝘁𝗰𝗵` and `𝗴𝗶𝘁 𝗽𝘂𝗹𝗹` differ?
    - How do you check the 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲𝘀 between 𝘁𝘄𝗼 𝗰𝗼𝗺𝗺𝗶𝘁𝘀 in Git?
    - How do you check the 𝘀𝘁𝗮𝘁𝘂𝘀 of the 𝘄𝗼𝗿𝗸𝗶𝗻𝗴 𝗱𝗶𝗿𝗲𝗰𝘁𝗼𝗿𝘆 in Git?
    - While you’re in the middle of working on a feature when you realize you need to address an urgent bug fix that requires your 𝗶𝗺𝗺𝗲𝗱𝗶𝗮𝘁𝗲 𝗮𝘁𝘁𝗲𝗻𝘁𝗶𝗼𝗻. How would you handle temporarily setting aside your current changes to focus on the bug fix 𝘄𝗶𝘁𝗵𝗼𝘂𝘁 𝗰𝗼𝗺𝗺𝗶𝘁𝘁𝗶𝗻𝗴 incomplete work?
    - How do you handle and resolve 𝗖𝗣𝗨-𝗿𝗲𝗹𝗮𝘁𝗲𝗱 tickets?
    - Where do you configure 𝗗𝗼𝗰𝗸𝗲𝗿 𝗛𝘂𝗯 credentials and 𝗥𝗗𝗦 credentials?
    - As the sole DevOps engineer working with a few developers, how do you 𝗰𝗼𝗹𝗹𝗮𝗯𝗼𝗿𝗮𝘁𝗲 and 𝗺𝗮𝗻𝗮𝗴𝗲 𝘁𝗮𝘀𝗸𝘀?
    - What are the differences between 𝘃𝗶𝗿𝘁𝘂𝗮𝗹𝗶𝘇𝗮𝘁𝗶𝗼𝗻 and 𝗰𝗼𝗻𝘁𝗮𝗶𝗻𝗲𝗿𝗶𝘇𝗮𝘁𝗶𝗼𝗻?
    - Can you explain 𝗩𝗣𝗖𝘀? How can you distinguish between a 𝗽𝗿𝗶𝘃𝗮𝘁𝗲 𝘀𝘂𝗯𝗻𝗲𝘁 and a 𝗽𝘂𝗯𝗹𝗶𝗰 𝘀𝘂𝗯𝗻𝗲𝘁?
    - What are 𝗡𝗔𝗖𝗟𝘀 and 𝗡𝗔𝗧 𝗴𝗮𝘁𝗲𝘄𝗮𝘆𝘀, and how are they used?
    - What are 𝗗𝗼𝗰𝗸𝗲𝗿𝗳𝗶𝗹𝗲𝘀 and 𝗽𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀? How are they used in 𝗖𝗜/𝗖𝗗?
    - Where should 𝗡𝗲𝘅𝘂𝘀 credentials be stored securely?
    - What is 𝗠𝗮𝘃𝗲𝗻, and what are its primary uses?
    - How do you 𝗶𝗴𝗻𝗼𝗿𝗲 certain 𝗳𝗶𝗹𝗲𝘀 while creating a 𝗗𝗼𝗰𝗸𝗲𝗿𝗳𝗶𝗹𝗲?
    - What is 𝗘𝗞𝗦, and what are its benefits?
    - What is a change request, and how is it handled in a DevOps environment?
    - Can you compare 𝗡𝗟𝗕 (𝗡𝗲𝘁𝘄𝗼𝗿𝗸 𝗟𝗼𝗮𝗱 𝗕𝗮𝗹𝗮𝗻𝗰𝗲𝗿) and 𝗔𝗟𝗕 (𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗟𝗼𝗮𝗱 𝗕𝗮𝗹𝗮𝗻𝗰𝗲𝗿)?
    - What are the differences between 𝗛𝗧𝗧𝗣 and 𝗛𝗧𝗧𝗣𝗦?

AWS Interview Questions:

1.What is AWS Landing Zone?
2.What is AWS Organizations?
3.Explain about S3 secured way of giving access to users?
4.IAM User vs Role?
5.IAM Assume Role?
6.What is a condition in IAM Policy?
7.What is the difference between a public subnet and a private subnet?
8.How to connect a private subnet or server from public?
9.What is Private Link in S3?
10.VPC Endpoint Types?
11.Have you ever configured a Transit Gateway?
12.What is the difference between a Security Group and NACL?
13.What is VPC Peering and its steps?
14.VPC Transit Gateway Steps?
15.On-premises to S3 connection?
16.Explain IAM Policy and all steps in that?
17.Terraform import — Explain with example?
18.Terraform Module?
19. .git-ci.yaml file for Terraform steps?
20.What have you done in Terraform?
21.What is a Statefile and where do you keep the Statefile?
22.How do you do patching for servers?
23.How do you monitor server patching?
24.How to secure the resources in AWS?
25.Encryption Types?
26.Encryption in REST vs Transit?
27.How do you encrypt in S3 and the types?
28.How to monitor VPC logs?
29.What observability tools do you use in projects?
30.What are GitLab Actions?
31.Is documentation of tasks good or bad?
32.What is Sentinel Policy?
33.What is Terraform Drift?

Lambda Questions:
How to optimize Lambda function?
1.How to increase Lambda function performance?
2.Common issues you face in Lambda function?
3.GitLab actions
4.Event-driven architecture for Lambda
5.What resources do you use for event-driven Lambda?
6.Error handling in Lambda
7.How do you monitor Lambda?
8.How do you handle synchronous invocation?
9.How do you handle Lambda timeout?
10.How do you capture failed events?
11.Security in serverless architecture
12.Limitations of Lambda

Hope it helps!

Thank you for reading so far! Before you go:

--

--

Nivas DevSecOps
Nivas DevSecOps

Written by Nivas DevSecOps

Cloud | DevSecOps| AWS ⭐Passionate Cloud and DevOps . 🎯 Like to stay up-to-date with the latest trends and insights.

No responses yet